diff --git a/tests/unit-tests/test-state.cc.outdated b/tests/unit-tests/test-state.cc.outdated
deleted file mode 100644
index 433f8d9..0000000
--- a/tests/unit-tests/test-state.cc.outdated
+++ /dev/null
@@ -1,291 +0,0 @@
-/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
-/*
- * Copyright (c) 2012-2014 University of California, Los Angeles
- *
- * This file is part of ChronoSync, synchronization library for distributed realtime
- * applications for NDN.
- *
- * ChronoSync is free software: you can redistribute it and/or modify it under the terms
- * of the GNU General Public License as published by the Free Software Foundation, either
- * version 3 of the License, or (at your option) any later version.
- *
- * ChronoSync is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.  See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * ChronoSync, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#define BOOST_TEST_DYN_LINK 1
-#define BOOST_TEST_NO_MAIN 1
-// #define BOOST_TEST_MODULE StateTests
-#include <boost/test/unit_test.hpp>
-#include <boost/test/output_test_stream.hpp>
-using boost::test_tools::output_test_stream;
-
-#include <boost/make_shared.hpp>
-#include <boost/date_time/posix_time/posix_time.hpp>
-
-#include "sync-std-name-info.h"
-#include "sync-full-state.h"
-#include "sync-diff-state.h"
-
-using namespace Sync;
-using namespace std;
-using namespace boost;
-
-BOOST_AUTO_TEST_SUITE(StateTests)
-
-BOOST_AUTO_TEST_CASE (FullStateTest)
-{
-  BOOST_CHECK_NO_THROW (FullState ());
-  FullState state;
-  BOOST_CHECK_EQUAL (state.getLeaves ().size (), 0);
-
-  output_test_stream output;
-  output << state.getTimeFromLastUpdate ();
-  BOOST_CHECK (output.is_equal ("not-a-date-time", true));
-
-  NameInfoConstPtr name = StdNameInfo::FindOrCreate ("/test/name");
-  BOOST_CHECK_NO_THROW (state.update (name, SeqNo (12)));
-  BOOST_CHECK_NO_THROW (state.update (name, SeqNo (12)));
-  BOOST_CHECK_NO_THROW (state.update (name, SeqNo (12)));
-  BOOST_CHECK_EQUAL (state.getLeaves ().size (), 1);
-  BOOST_CHECK_EQUAL ((*state.getLeaves ().begin ())->getSeq ().getSeq (), 12);
-
-  BOOST_CHECK_NO_THROW (state.update (name, SeqNo (13)));
-  BOOST_CHECK_EQUAL ((*state.getLeaves ().begin ())->getSeq ().getSeq (), 13);
-
-  BOOST_CHECK_NO_THROW (state.remove (name));
-  BOOST_CHECK_EQUAL (state.getLeaves ().size (), 0);
-
-  BOOST_CHECK_EQUAL (state.getTimeFromLastUpdate ().total_milliseconds (), 0);
-}
-
-BOOST_AUTO_TEST_CASE (DiffStateTest)
-{
-  BOOST_CHECK_NO_THROW (DiffState ());
-  DiffState state;
-  BOOST_CHECK_EQUAL (state.getLeaves ().size (), 0);
-
-  NameInfoConstPtr name = StdNameInfo::FindOrCreate ("/test/name");
-  BOOST_CHECK_NO_THROW (state.update (name, SeqNo (12)));
-  BOOST_CHECK_NO_THROW (state.update (name, SeqNo (12)));
-  BOOST_CHECK_NO_THROW (state.update (name, SeqNo (12)));
-  BOOST_CHECK_EQUAL (state.getLeaves ().size (), 1);
-  BOOST_CHECK_EQUAL ((*state.getLeaves ().begin ())->getSeq ().getSeq (), 12);
-
-  BOOST_CHECK_NO_THROW (state.update (name, SeqNo (13)));
-  BOOST_CHECK_EQUAL ((*state.getLeaves ().begin ())->getSeq ().getSeq (), 13);
-
-  BOOST_CHECK_NO_THROW (state.remove (name));
-  BOOST_CHECK_EQUAL (state.getLeaves ().size (), 1);
-  BOOST_CHECK_EQUAL ((*state.getLeaves ().begin ())->getSeq ().getSeq (), 0);
-}
-
-BOOST_AUTO_TEST_CASE (FullStateDigestTest)
-{
-  FullState state;
-  BOOST_CHECK_EQUAL (state.getLeaves ().size (), 0);
-
-  NameInfoConstPtr name3 = StdNameInfo::FindOrCreate ("3");
-  NameInfoConstPtr name2 = StdNameInfo::FindOrCreate ("2");
-  NameInfoConstPtr name1 = StdNameInfo::FindOrCreate ("1");
-
-  state.update (name1, SeqNo (10));
-  DigestConstPtr digest1 = state.getDigest ();
-
-  state.update (name2, SeqNo (12));
-  DigestConstPtr digest2 = state.getDigest ();
-
-  BOOST_CHECK (digest1.get () != digest2.get ());
-  BOOST_CHECK (!digest1->empty ());
-  BOOST_CHECK (!digest2->empty ());
-
-  state.update (name3, SeqNo (8));
-  DigestConstPtr digest3 = state.getDigest ();
-
-  BOOST_CHECK (digest1.get () != digest2.get ());
-  BOOST_CHECK (digest2.get () != digest3.get ());
-  BOOST_CHECK (digest1.get () != digest3.get ());
-
-  BOOST_CHECK (*digest1 != *digest2);
-  BOOST_CHECK (*digest2 != *digest3);
-  BOOST_CHECK (*digest1 != *digest3);
-
-  // removing elements. Digest should get reverted to digest1
-  state.remove (name2);
-  state.remove (name3);
-  DigestConstPtr digest4 = state.getDigest ();
-  BOOST_CHECK (*digest1 == *digest4);
-
-  name2.reset (); // force destructor
-  name3.reset (); // force destructor
-  name3 = StdNameInfo::FindOrCreate ("3"); // this will enforce different (larger) hashing ID of name
-  name2 = StdNameInfo::FindOrCreate ("2"); // this will enforce different (larger) hashing ID of name
-
-  // adding in different order
-  state.update (name3, SeqNo (8));
-  state.update (name2, SeqNo (12));
-  DigestConstPtr digest5 = state.getDigest ();
-  BOOST_CHECK (*digest5 == *digest3);
-}
-
-BOOST_AUTO_TEST_CASE (FullStateXml)
-{
-  FullState state;
-
-  NameInfoConstPtr name3 = StdNameInfo::FindOrCreate ("3");
-  NameInfoConstPtr name2 = StdNameInfo::FindOrCreate ("2");
-  NameInfoConstPtr name1 = StdNameInfo::FindOrCreate ("1");
-
-  state.update (name1, SeqNo (10));
-  state.update (name2, SeqNo (12));
-  state.update (name3, SeqNo (8));
-
-  string xml1 = "<state>"
-    "<item><name>1</name><seq><session>0</session><seqno>10</seqno></seq></item>"
-    "<item><name>2</name><seq><session>0</session><seqno>12</seqno></seq></item>"
-    "<item><name>3</name><seq><session>0</session><seqno>8</seqno></seq></item>"
-    "</state>";
-  {
-  ostringstream os;
-  os << state;
-  string s = os.str ();
-  // cout << s << endl;
-  erase_all (s, "\n");
-  BOOST_CHECK_EQUAL (s, xml1);
-  }
-
-  state.remove (name2);
-  string xml2 = "<state>"
-    "<item><name>1</name><seq><session>0</session><seqno>10</seqno></seq></item>"
-    "<item><name>3</name><seq><session>0</session><seqno>8</seqno></seq></item>"
-    "</state>";
-  {
-  ostringstream os;
-  os << state;
-  string s = os.str ();
-  erase_all (s, "\n");
-  BOOST_CHECK_EQUAL (s, xml2);
-  }
-
-  FullState state2;
-  istringstream xml1_is (xml1);
-  BOOST_CHECK_NO_THROW (xml1_is >> state2);
-  {
-  ostringstream os;
-  os << state2;
-  string xml1_test = os.str ();
-  erase_all (xml1_test, "\n");
-  BOOST_CHECK_EQUAL (xml1_test, xml1);
-  }
-
-  istringstream xml2_is ("<state><item action=\"remove\"><name>2</name></item></state>");
-  BOOST_CHECK_NO_THROW (xml2_is >> state2);
-
-  {
-  ostringstream os;
-  os << state2;
-  string xml2_test = os.str ();
-  erase_all (xml2_test, "\n");
-  BOOST_CHECK_EQUAL (xml2_test, xml2);
-  }
-}
-
-BOOST_AUTO_TEST_CASE (DiffStateXml)
-{
-  DiffState state;
-
-  NameInfoConstPtr name3 = StdNameInfo::FindOrCreate ("3");
-  NameInfoConstPtr name2 = StdNameInfo::FindOrCreate ("2");
-  NameInfoConstPtr name1 = StdNameInfo::FindOrCreate ("1");
-
-  state.update (name1, SeqNo (10));
-  state.update (name2, SeqNo (12));
-  state.update (name3, SeqNo (8));
-
-  string xml1 = "<state>"
-    "<item action=\"update\"><name>1</name><seq><session>0</session><seqno>10</seqno></seq></item>"
-    "<item action=\"update\"><name>2</name><seq><session>0</session><seqno>12</seqno></seq></item>"
-    "<item action=\"update\"><name>3</name><seq><session>0</session><seqno>8</seqno></seq></item>"
-    "</state>";
-  {
-  ostringstream os;
-  os << state;
-  string xml1_test = os.str ();
-  erase_all (xml1_test, "\n");
-  BOOST_CHECK_EQUAL (xml1_test, xml1);
-  }
-
-  state.remove (name2);
-  string xml2 = "<state>"
-    "<item action=\"update\"><name>1</name><seq><session>0</session><seqno>10</seqno></seq></item>"
-    "<item action=\"remove\"><name>2</name></item>"
-    "<item action=\"update\"><name>3</name><seq><session>0</session><seqno>8</seqno></seq></item>"
-    "</state>";
-  {
-  ostringstream os;
-  os << state;
-  string xml2_test = os.str ();
-  erase_all (xml2_test, "\n");
-  BOOST_CHECK_EQUAL (xml2_test, xml2);
-  }
-
-  ////////////  ////////////  ////////////  ////////////  ////////////  ////////////
-
-  DiffState state2;
-  istringstream xml1_is (xml1);
-  BOOST_CHECK_NO_THROW (xml1_is >> state2);
-
-  {
-  ostringstream os;
-  os << state2;
-  string xml1_test = os.str ();
-  erase_all (xml1_test, "\n");
-  BOOST_CHECK_EQUAL (xml1_test, xml1);
-  }
-
-  istringstream xml2_is ("<state><item action=\"remove\"><name>2</name></item></state>");
-  BOOST_CHECK_NO_THROW (xml2_is >> state2);
-
-  {
-  ostringstream os;
-  os << state2;
-  string xml2_test = os.str ();
-  erase_all (xml2_test, "\n");
-  BOOST_CHECK_EQUAL (xml2_test, xml2);
-  }
-
-}
-
-BOOST_AUTO_TEST_CASE (DiffStateDiffTest)
-{
-  DiffStatePtr root = make_shared<DiffState> ();
-
-  DiffStatePtr head = make_shared<DiffState> ();
-  root->setNext (head);
-
-  head->update (StdNameInfo::FindOrCreate ("3"), SeqNo (1));
-  head->remove (StdNameInfo::FindOrCreate ("1"));
-
-  DiffStatePtr tail = make_shared<DiffState> ();
-  head->setNext (tail);
-
-  tail->update (StdNameInfo::FindOrCreate ("3"), SeqNo (2));
-
-  {
-  ostringstream os;
-  os << *root->diff ();
-  string diffState = os.str ();
-  erase_all (diffState, "\n");
-  BOOST_CHECK_EQUAL (diffState,
-                     "<state>"
-                     "<item action=\"remove\"><name>1</name></item>"
-                     "<item action=\"update\"><name>3</name><seq><session>0</session><seqno>2</seqno></seq></item>"
-                     "</state>");
-  }
-}
-
-BOOST_AUTO_TEST_SUITE_END()
diff --git a/tests/unit-tests/test-state.cpp b/tests/unit-tests/test-state.cpp
new file mode 100644
index 0000000..ed88373
--- /dev/null
+++ b/tests/unit-tests/test-state.cpp
@@ -0,0 +1,223 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2012-2014 University of California, Los Angeles
+ *
+ * This file is part of ChronoSync, synchronization library for distributed realtime
+ * applications for NDN.
+ *
+ * ChronoSync is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation, either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * ChronoSync is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * ChronoSync, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "state.hpp"
+#include "boost-test.hpp"
+
+namespace chronosync {
+namespace test {
+
+using boost::tuple;
+
+BOOST_AUTO_TEST_SUITE(StateTests)
+
+BOOST_AUTO_TEST_CASE(Basic)
+{
+  BOOST_CHECK_NO_THROW(State());
+  State state;
+  BOOST_CHECK_EQUAL(state.getLeaves().size(), 0);
+
+  Name info("/test/name");
+  info.appendNumber(0);
+
+  BOOST_CHECK_NO_THROW(state.update(info, 12));
+
+  BOOST_CHECK_NO_THROW(state.reset());
+  BOOST_CHECK_EQUAL(state.getLeaves().size(), 0);
+
+  tuple<bool, bool, SeqNo> result;
+  result = state.update(info, 12);
+  BOOST_CHECK_EQUAL(result.get<0>(), true);
+  BOOST_CHECK_EQUAL(result.get<1>(), false);
+  BOOST_CHECK_EQUAL(result.get<2>(), 0);
+
+  BOOST_CHECK_NO_THROW(state.update(info, 12));
+  result = state.update(info, 12);
+  BOOST_CHECK_EQUAL(result.get<0>(), false);
+  BOOST_CHECK_EQUAL(result.get<1>(), false);
+  BOOST_CHECK_EQUAL(result.get<2>(), 0);
+
+  BOOST_CHECK_NO_THROW(state.update(info, 11));
+  result = state.update(info, 11);
+  BOOST_CHECK_EQUAL(result.get<0>(), false);
+  BOOST_CHECK_EQUAL(result.get<1>(), false);
+  BOOST_CHECK_EQUAL(result.get<2>(), 0);
+
+  BOOST_CHECK_EQUAL(state.getLeaves().size(), 1);
+  BOOST_CHECK_EQUAL((*state.getLeaves().begin())->getSeq(), 12);
+
+  BOOST_CHECK_NO_THROW(state.update(info, 13));
+  BOOST_CHECK_EQUAL(state.getLeaves().size(), 1);
+  BOOST_CHECK_EQUAL((*state.getLeaves().begin())->getSeq(), 13);
+
+  result = state.update(info, 14);
+  BOOST_CHECK_EQUAL(result.get<0>(), false);
+  BOOST_CHECK_EQUAL(result.get<1>(), true);
+  BOOST_CHECK_EQUAL(result.get<2>(), 13);
+
+  BOOST_CHECK_EQUAL(state.getLeaves().size(), 1);
+  BOOST_CHECK_EQUAL((*state.getLeaves().begin())->getSeq(), 14);
+
+  Name info2("/test/name");
+  info2.appendNumber(1);
+  BOOST_CHECK_NO_THROW(state.update(info2, 3));
+  BOOST_CHECK_EQUAL(state.getLeaves().size(), 2);
+}
+
+BOOST_AUTO_TEST_CASE(StateDigest)
+{
+  State state;
+  BOOST_CHECK_EQUAL(state.getLeaves().size(), 0);
+
+  Name info1("/test/name");
+  info1.appendNumber(0);
+
+  Name info2("/test/name");
+  info2.appendNumber(1);
+
+  Name info3("/test/mane");
+  info3.appendNumber(0);
+
+  state.update(info1, 10);
+  ndn::ConstBufferPtr digest1 = state.getRootDigest();
+
+  state.update(info2, 12);
+  ndn::ConstBufferPtr digest2 = state.getRootDigest();
+
+  state.update(info3, 8);
+  ndn::ConstBufferPtr digest3 = state.getRootDigest();
+
+  BOOST_CHECK(*digest1 != *digest2);
+  BOOST_CHECK(*digest2 != *digest3);
+  BOOST_CHECK(*digest1 != *digest3);
+
+  state.reset();
+
+  state.update(info1, 10);
+  ndn::ConstBufferPtr digest4 = state.getRootDigest();
+
+  state.update(info3, 8);
+  ndn::ConstBufferPtr digest5 = state.getRootDigest();
+
+  state.update(info2, 12);
+  ndn::ConstBufferPtr digest6 = state.getRootDigest();
+
+  BOOST_CHECK(*digest4 == *digest1);
+  BOOST_CHECK(*digest5 != *digest2);
+  BOOST_CHECK(*digest6 == *digest3);
+}
+
+BOOST_AUTO_TEST_CASE(DecodeEncode)
+{
+  const uint8_t wire[] = {
+    0x80, 0x2c, // SyncReply
+      0x81, 0x14, // StateLeaf
+        0x07, 0x0f, // Name: /test/name/[0]
+          0x08, 0x04,
+            0x74, 0x65, 0x73, 0x74,
+          0x08, 0x04,
+            0x6e, 0x61, 0x6d, 0x65,
+          0x08, 0x01,
+            0x00,
+        0x82, 0x1, // SeqNo: 14
+          0x0e,
+      0x81, 0x14, // StateLeaf
+        0x07, 0x0f, // Name: /test/name/[1]
+          0x08, 0x04,
+            0x74, 0x65, 0x73, 0x74,
+          0x08, 0x04,
+            0x6e, 0x61, 0x6d, 0x65,
+          0x08, 0x01,
+            0x01,
+        0x82, 0x1, // SeqNo: 4
+          0x04
+  };
+
+  Block block(wire, sizeof(wire));
+  State state;
+  BOOST_REQUIRE_NO_THROW(state.wireDecode(block));
+
+  BOOST_CHECK_EQUAL(state.getLeaves().size(), 2);
+  LeafContainer::index<ordered>::type::iterator it = state.getLeaves().get<ordered>().begin();
+  BOOST_CHECK_EQUAL((*it)->getSeq(), 14);
+  it++;
+  BOOST_CHECK_EQUAL((*it)->getSeq(), 4);
+
+
+  State state2;
+
+  Name info1("/test/name");
+  info1.appendNumber(0);
+  state2.update(info1, 14);
+
+  Name info2("/test/name");
+  info2.appendNumber(1);
+  state2.update(info2, 4);
+
+  BOOST_REQUIRE_NO_THROW(state2.wireEncode());
+  Block block2 = state2.wireEncode();
+
+  BOOST_CHECK_EQUAL_COLLECTIONS(block.wire(),
+                                block.wire() + block.size(),
+                                block2.wire(),
+                                block2.wire() + block2.size());
+
+  BOOST_CHECK(*state.getRootDigest() == *state2.getRootDigest());
+}
+
+BOOST_AUTO_TEST_CASE(Combine)
+{
+  State state1;
+  State state2;
+
+  Name info1("/test/name");
+  info1.appendNumber(0);
+
+  Name info2("/test/name");
+  info2.appendNumber(1);
+
+  Name info3("/test/name");
+  info3.appendNumber(2);
+
+  state1.update(info1, 4);
+  state1.update(info2, 14);
+
+  state2.update(info2, 15);
+  state2.update(info3, 25);
+
+  BOOST_CHECK_EQUAL(state1.getLeaves().size(), 2);
+  BOOST_CHECK_EQUAL(state2.getLeaves().size(), 2);
+
+  BOOST_REQUIRE_NO_THROW(state2 += state1);
+
+  BOOST_CHECK_EQUAL(state1.getLeaves().size(), 2);
+  BOOST_CHECK_EQUAL(state2.getLeaves().size(), 3);
+
+  LeafContainer::index<ordered>::type::iterator it = state2.getLeaves().get<ordered>().begin();
+  BOOST_CHECK_EQUAL((*it)->getSeq(), 4);
+  it++;
+  BOOST_CHECK_EQUAL((*it)->getSeq(), 15);
+  it++;
+  BOOST_CHECK_EQUAL((*it)->getSeq(), 25);
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+
+} // namespace test
+} // namespace chronosync
