diff --git a/model/sync-full-state.cc b/model/sync-full-state.cc
index 7e4a30f..801bfbf 100644
--- a/model/sync-full-state.cc
+++ b/model/sync-full-state.cc
@@ -65,7 +65,7 @@
   if (m_digest == 0)
     {
       m_digest = make_shared<Digest> ();
-      BOOST_FOREACH (LeafConstPtr leaf, m_leaves)
+      BOOST_FOREACH (LeafConstPtr leaf, m_leaves.get<ordered> ())
         {
           FullLeafConstPtr fullLeaf = dynamic_pointer_cast<const FullLeaf> (leaf);
           BOOST_ASSERT (fullLeaf != 0);
diff --git a/model/sync-name-info.h b/model/sync-name-info.h
index bc04c33..ebe946b 100644
--- a/model/sync-name-info.h
+++ b/model/sync-name-info.h
@@ -47,11 +47,22 @@
    */
   size_t
   getHashId () const { return m_id; }
-  
+
+  /**
+   * @brief Check if two names are equal
+   * @param info name to check with
+   */
   virtual bool
   operator == (const NameInfo &info) const = 0;
 
   /**
+   * @brief Check if two names are in order
+   * @param info name to check with
+   */
+  virtual bool
+  operator < (const NameInfo &info) const = 0;
+
+  /**
    * @brief Calculates digest of the name
    */
   const Digest &
diff --git a/model/sync-state-leaf-container.h b/model/sync-state-leaf-container.h
index 8f44fc9..2c7e8b9 100644
--- a/model/sync-state-leaf-container.h
+++ b/model/sync-state-leaf-container.h
@@ -24,10 +24,11 @@
 #define SYNC_STATE_LEAF_CONTAINER
 
 #include "sync-leaf.h"
+#include "sync-name-info.h"
 
 #include <boost/multi_index_container.hpp>
 // #include <boost/multi_index/tag.hpp>
-// #include <boost/multi_index/ordered_index.hpp>
+#include <boost/multi_index/ordered_index.hpp>
 // #include <boost/multi_index/composite_key.hpp>
 #include <boost/multi_index/hashed_index.hpp>
 // #include <boost/multi_index/random_access_index.hpp>
@@ -48,6 +49,7 @@
 };
 
 struct hashed { };
+struct ordered { };
 
 /**
  * \ingroup sync
@@ -61,7 +63,11 @@
         mi::tag<hashed>,
         mi::const_mem_fun<Leaf, const NameInfo&, &Leaf::getInfo>,
         NameInfoHash
-      >
+        >,
+      mi::ordered_unique<
+        mi::tag<ordered>,
+        mi::const_mem_fun<Leaf, const NameInfo&, &Leaf::getInfo>
+        >
     >
    >
 {
diff --git a/model/sync-state.h b/model/sync-state.h
index edff566..0576af2 100644
--- a/model/sync-state.h
+++ b/model/sync-state.h
@@ -58,6 +58,13 @@
   virtual void
   remove (NameInfoConstPtr info) = 0;
 
+  /**
+   * @brief Get state leaves
+   */
+  const LeafContainer &
+  getLeaves () const 
+  { return m_leaves; }
+  
 protected:
   LeafContainer m_leaves;
 };
diff --git a/model/sync-std-name-info.cc b/model/sync-std-name-info.cc
index 5b57fbe..53fcdac 100644
--- a/model/sync-std-name-info.cc
+++ b/model/sync-std-name-info.cc
@@ -54,15 +54,13 @@
 bool
 StdNameInfo::operator == (const NameInfo &info) const
 {
-  try
-    {
-      return m_name == dynamic_cast<const StdNameInfo&> (info).m_name;
-    }
-  catch (...)
-    {
-      return false;
-    }
+  return m_name == dynamic_cast<const StdNameInfo&> (info).m_name;
+}
+
+bool
+StdNameInfo::operator < (const NameInfo &info) const
+{
+  return m_name < dynamic_cast<const StdNameInfo&> (info).m_name;
 }
 
 } // Sync
-
diff --git a/model/sync-std-name-info.h b/model/sync-std-name-info.h
index 34b853a..1821fb4 100644
--- a/model/sync-std-name-info.h
+++ b/model/sync-std-name-info.h
@@ -44,6 +44,9 @@
   virtual bool
   operator == (const NameInfo &info) const;
 
+  virtual bool
+  operator < (const NameInfo &info) const;
+
   virtual std::string
   toString () const;
 
diff --git a/test/test_leaf.cc b/test/test_leaf.cc
index d2c8289..991e14b 100644
--- a/test/test_leaf.cc
+++ b/test/test_leaf.cc
@@ -85,15 +85,22 @@
   // manualNameDigest.finalize ();
 
   // Digest manualSeqNoDigest;
-  // manualSeqNoDigest << 0 << 12;
+  // manualSeqNoDigest << 0 << 13;
   // manualSeqNoDigest.finalize ();
 
   // manualDigest << manualNameDigest << manualSeqNoDigest;
   // manualDigest.finalize ();
 
+  // cout << manualDigest << "\n\n";
+
   output_test_stream output;
   output << fullLeaf.getDigest ();
   BOOST_CHECK (output.is_equal ("991f8cf6262dfe0f519c63f6e9b92fe69e741a9b", true));
+
+  fullLeaf.setSeq (SeqNo (13));
+  output << fullLeaf.getDigest ();
+  BOOST_CHECK (!output.is_equal ("991f8cf6262dfe0f519c63f6e9b92fe69e741a9b", false));
+  BOOST_CHECK (output.is_equal ("585a8687ab41d5c29f86e5906c8f188ddca816b3", true));
 }
 
 BOOST_AUTO_TEST_SUITE_END()
diff --git a/test/test_state.cc b/test/test_state.cc
new file mode 100644
index 0000000..00be3c4
--- /dev/null
+++ b/test/test_state.cc
@@ -0,0 +1,87 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2012 University of California, Los Angeles
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
+ *         卞超轶 Chaoyi Bian <bcy@pku.edu.cn>
+ *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ */
+
+#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 "../model/sync-std-name-info.h"
+#include "../model/sync-full-state.h"
+#include "../model/sync-diff-state.h"
+
+using namespace Sync;
+using namespace std;
+using namespace boost;
+
+BOOST_AUTO_TEST_SUITE(StateTestSuite)
+
+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_SUITE_END()
