diff --git a/tests/unit-tests/test-multiple-user.cpp b/tests/unit-tests/test-multiple-user.cpp
new file mode 100644
index 0000000..44209e8
--- /dev/null
+++ b/tests/unit-tests/test-multiple-user.cpp
@@ -0,0 +1,104 @@
+#include "logic.hpp"
+
+#include "boost-test.hpp"
+
+namespace chronosync {
+namespace test {
+
+using std::vector;
+
+
+class Handler
+{
+public:
+  Handler(ndn::Face& face,
+          const Name& syncPrefix,
+          const Name& userPrefix)
+    : logic(face,
+            syncPrefix,
+            userPrefix,
+            bind(&Handler::onUpdate, this, _1))
+  {
+  }
+
+  void
+  onUpdate(const vector<MissingDataInfo>& v)
+  {
+
+  }
+
+  void
+  updateSeqNo(const SeqNo& seqNo)
+  {
+    logic.updateSeqNo(seqNo);
+  }
+
+  void
+  addUserNode(const Name& prefix)
+  {
+    logic.addUserNode(prefix);
+  }
+
+  void
+  removeUserNode(const Name& prefix)
+  {
+    logic.removeUserNode(prefix);
+  }
+
+
+  Logic logic;
+  std::map<Name, SeqNo> map;
+};
+
+class LogicFixture
+{
+public:
+
+  LogicFixture()
+    : syncPrefix("/ndn/broadcast/sync")
+    , scheduler(io)
+  {
+    syncPrefix.appendVersion();
+    userPrefix[0] = Name("/user0");
+    userPrefix[1] = Name("/user1");
+    userPrefix[2] = Name("/user2");
+
+    face = make_shared<ndn::Face>(ref(io));
+  }
+
+  Name syncPrefix;
+  Name userPrefix[3];
+
+  boost::asio::io_service io;
+  shared_ptr<ndn::Face> face;
+  ndn::Scheduler scheduler;
+  shared_ptr<Handler> handler;
+};
+
+BOOST_FIXTURE_TEST_SUITE(LogicTests, LogicFixture)
+
+BOOST_AUTO_TEST_CASE(ThreeUserNode)
+{
+  handler = make_shared<Handler>(ref(*face), syncPrefix, userPrefix[0]);
+  handler->addUserNode(userPrefix[1]);
+  handler->addUserNode(userPrefix[2]);
+  handler->removeUserNode(userPrefix[0]);
+
+  handler->logic.setDefaultUserPrefix(userPrefix[1]);
+  handler->updateSeqNo(1);
+  BOOST_CHECK_EQUAL(handler->logic.getSeqNo(userPrefix[1]), 1);
+
+  handler->logic.updateSeqNo(2, userPrefix[2]);
+  handler->logic.setDefaultUserPrefix(userPrefix[2]);
+
+  BOOST_CHECK_EQUAL(handler->logic.getSeqNo(), 2);
+
+  BOOST_REQUIRE_THROW(handler->logic.getSeqNo(userPrefix[0]), Logic::Error);
+  BOOST_REQUIRE_THROW(handler->logic.getSessionName(userPrefix[0]), Logic::Error);
+
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+
+} // namespace test
+} // namespace chronosync
