diff --git a/test/test-chatroom-discovery-logic.cpp b/test/test-chatroom-discovery-logic.cpp
deleted file mode 100644
index 1714e8a..0000000
--- a/test/test-chatroom-discovery-logic.cpp
+++ /dev/null
@@ -1,328 +0,0 @@
-#include "chatroom-discovery-logic.hpp"
-#include <boost/test/unit_test.hpp>
-#include "dummy-client-face.hpp"
-
-namespace chronos {
-
-namespace test {
-
-using std::string;
-
-BOOST_AUTO_TEST_SUITE(TestChatroomDiscoveryLogic)
-
-class Fixture
-{
-public:
-  Fixture()
-    : face(makeDummyClientFace())
-  {
-  }
-
-  void
-  update(const ChatroomInfo& chatroomName, bool isAdd)
-  {
-  }
-
-public:
-  shared_ptr<DummyClientFace> face;
-};
-
-BOOST_FIXTURE_TEST_CASE(AddLocalChatroom, Fixture)
-{
-  ChatroomDiscoveryLogic chatroomDiscoveryLogic(face, bind(&Fixture::update, this, _1, _2));
-
-  ChatroomInfo chatroom;
-  chatroom.setName(ndn::Name::Component("lunch-talk"));
-  chatroom.addParticipant(Name("/ndn/ucla/ymj"));
-  chatroom.addParticipant(Name("/ndn/ucla/alice"));
-  chatroom.setTrustModel(ChatroomInfo::TRUST_MODEL_WEBOFTRUST);
-  chatroomDiscoveryLogic.addLocalChatroom(chatroom);
-
-  ndn::Name::Component chatroomName("lunch-talk");
-
-  BOOST_CHECK_EQUAL(chatroomDiscoveryLogic.getChatrooms().size(), 1);
-  BOOST_CHECK_EQUAL(chatroom.getName(),
-                    chatroomDiscoveryLogic.getChatrooms().find(chatroomName)
-                    ->second.getName());
-  BOOST_CHECK_EQUAL(chatroom.getParticipants().size(),
-                    chatroomDiscoveryLogic
-                    .getChatrooms().find(chatroomName)->second.getParticipants().size());
-  BOOST_CHECK_EQUAL(chatroom.getParticipants()[0].toUri(),
-                    chatroomDiscoveryLogic
-                    .getChatrooms().find(chatroomName)->second
-                    .getParticipants()[0].toUri());
-  BOOST_CHECK_EQUAL(chatroom.getParticipants()[1].toUri(),
-                    chatroomDiscoveryLogic
-                    .getChatrooms().find(chatroomName)->second
-                    .getParticipants()[1].toUri());
-  BOOST_CHECK_EQUAL(chatroom.getTrustModel(),
-                    chatroomDiscoveryLogic
-                    .getChatrooms().find(chatroomName)->second.getTrustModel());
-}
-
-BOOST_FIXTURE_TEST_CASE(RemoveLocalChatroom, Fixture)
-{
-  ChatroomDiscoveryLogic chatroomDiscoveryLogic(face, bind(&Fixture::update, this, _1, _2));
-
-  ChatroomInfo chatroom;
-  chatroom.setName(ndn::Name::Component("lunch-talk"));
-  chatroom.addParticipant(Name("/ndn/ucla/ymj"));
-  chatroom.addParticipant(Name("/ndn/ucla/alice"));
-  chatroom.setTrustModel(ChatroomInfo::TRUST_MODEL_WEBOFTRUST);
-  chatroomDiscoveryLogic.addLocalChatroom(chatroom);
-
-  ndn::Name::Component chatroomName1("lunch-talk");
-  ndn::Name::Component chatroomName2("supper-talk");
-
-  chatroomDiscoveryLogic.removeLocalChatroom(chatroomName2);
-
-  BOOST_CHECK_EQUAL(chatroomDiscoveryLogic.getChatrooms().size(), 1);
-  BOOST_CHECK_EQUAL(chatroom.getName(),
-                    chatroomDiscoveryLogic.getChatrooms().find(chatroomName1)
-                    ->second.getName());
-  BOOST_CHECK_EQUAL(chatroom.getParticipants().size(),
-                    chatroomDiscoveryLogic
-                    .getChatrooms().find(chatroomName1)->second.getParticipants().size());
-  BOOST_CHECK_EQUAL(chatroom.getParticipants()[0].toUri(),
-                    chatroomDiscoveryLogic
-                    .getChatrooms().find(chatroomName1)->second
-                    .getParticipants()[0].toUri());
-  BOOST_CHECK_EQUAL(chatroom.getParticipants()[1].toUri(),
-                    chatroomDiscoveryLogic
-                    .getChatrooms().find(chatroomName1)->second
-                    .getParticipants()[1].toUri());
-  BOOST_CHECK_EQUAL(chatroom.getTrustModel(),
-                    chatroomDiscoveryLogic
-                    .getChatrooms().find(chatroomName1)->second.getTrustModel());
-
-  chatroomDiscoveryLogic.removeLocalChatroom(chatroomName1);
-  BOOST_CHECK_EQUAL(chatroomDiscoveryLogic.getChatrooms().size(), 0);
-}
-
-BOOST_FIXTURE_TEST_CASE(sendChatroomInterestFunction, Fixture)
-{
-  ChatroomDiscoveryLogic chatroomDiscoveryLogic(face, bind(&Fixture::update, this, _1, _2));
-  chatroomDiscoveryLogic.sendDiscoveryInterest();
-
-  face->processEvents(time::milliseconds(100));
-
-  //with no exclude filter
-  BOOST_CHECK_EQUAL(face->m_sentInterests.size(), 2);//first is nfd register interest
-  BOOST_CHECK_EQUAL(face->m_sentDatas.size(), 0);
-  BOOST_CHECK_EQUAL(face->m_sentInterests[1].getName().toUri(),
-                    ChatroomDiscoveryLogic::DISCOVERY_PREFIX.toUri());
-  BOOST_CHECK_EQUAL(face->m_sentInterests[1].getExclude().size(), 0);
-
-  face->m_sentInterests.clear();
-
-  //with exclude filter
-  ChatroomInfo chatroom;
-  chatroom.setName(ndn::Name::Component("lunch-talk"));
-  chatroom.addParticipant(Name("/ndn/ucla/ymj"));
-  chatroom.addParticipant(Name("/ndn/ucla/alice"));
-  chatroom.setTrustModel(ChatroomInfo::TRUST_MODEL_WEBOFTRUST);
-  chatroomDiscoveryLogic.addLocalChatroom(chatroom);
-
-  chatroomDiscoveryLogic.sendDiscoveryInterest();
-  face->processEvents(time::milliseconds(100));
-
-  BOOST_CHECK_EQUAL(face->m_sentInterests.size(), 1);
-  BOOST_CHECK_EQUAL(face->m_sentDatas.size(), 0);
-  BOOST_CHECK_EQUAL(face->m_sentInterests[0].getName().toUri(),
-                    ChatroomDiscoveryLogic::DISCOVERY_PREFIX.toUri());
-  BOOST_CHECK_EQUAL(face->m_sentInterests[0].getExclude().size(), 1);
-  BOOST_CHECK_EQUAL(face->m_sentInterests[0].getExclude().toUri(), "lunch-talk");
-}
-
-BOOST_FIXTURE_TEST_CASE(onDiscoveryInterest, Fixture)
-{
-  face->m_sentInterests.clear();
-  face->m_sentDatas.clear();
-
-  Interest discovery(ChatroomDiscoveryLogic::DISCOVERY_PREFIX);
-  discovery.setMustBeFresh(true);
-  discovery.setInterestLifetime(time::milliseconds(10000));
-
-  Exclude exclude;
-  exclude.excludeOne(ndn::Name::Component("lunch-talk"));
-  discovery.setExclude(exclude);
-
-  ChatroomDiscoveryLogic chatroomDiscoveryLogic(face, bind(&Fixture::update, this, _1, _2));
-
-  ChatroomInfo chatroom1;
-  chatroom1.setName(ndn::Name::Component("lunch-talk"));
-  chatroom1.addParticipant(Name("/ndn/ucla/ymj"));
-  chatroom1.addParticipant(Name("/ndn/ucla/alice"));
-  chatroom1.setTrustModel(ChatroomInfo::TRUST_MODEL_WEBOFTRUST);
-  chatroomDiscoveryLogic.addLocalChatroom(chatroom1);
-
-  ChatroomInfo chatroom2;
-  chatroom2.setName(ndn::Name::Component("supper-talk"));
-  chatroom2.addParticipant(Name("/ndn/ucla/bob"));
-  chatroom2.addParticipant(Name("/ndn/ucla/peter"));
-  chatroom2.setTrustModel(ChatroomInfo::TRUST_MODEL_HIERARCHICAL);
-  chatroomDiscoveryLogic.addLocalChatroom(chatroom2);
-
-  //discovery
-  chatroomDiscoveryLogic.onDiscoveryInterest(ChatroomDiscoveryLogic::DISCOVERY_PREFIX, discovery);
-
-  face->processEvents(time::milliseconds(100));
-
-  BOOST_CHECK_EQUAL(face->m_sentInterests.size(), 1);//the interest is for nfd register
-  BOOST_CHECK_EQUAL(face->m_sentDatas.size(), 1);
-
-  ChatroomInfo chatroom;
-  chatroom.wireDecode(face->m_sentDatas[0].getContent().blockFromValue());
-  chatroom.setName(face->m_sentDatas[0].getName()
-                                      .get(ChatroomDiscoveryLogic::OFFSET_CHATROOM_NAME));
-
-  BOOST_CHECK_EQUAL(chatroom.getName(), chatroom2.getName());
-  BOOST_CHECK_EQUAL(chatroom.getParticipants().size(),
-                    chatroom2.getParticipants().size());
-  BOOST_CHECK_EQUAL(chatroom.getParticipants()[0].toUri(),
-                    chatroom2.getParticipants()[0].toUri());
-  BOOST_CHECK_EQUAL(chatroom.getParticipants()[1].toUri(),
-                    chatroom2.getParticipants()[1].toUri());
-  BOOST_CHECK_EQUAL(chatroom.getTrustModel(),
-                    chatroom2.getTrustModel());
-
-  //refreshing
-  face->m_sentInterests.clear();
-  face->m_sentDatas.clear();
-
-  Name name = ChatroomDiscoveryLogic::DISCOVERY_PREFIX;
-  name.append(Name("supper-talk"));
-
-  Interest refreshing(name);
-  refreshing.setMustBeFresh(true);
-  refreshing.setInterestLifetime(time::milliseconds(10000));
-
-  chatroomDiscoveryLogic.onDiscoveryInterest(name, refreshing);
-  face->processEvents(time::milliseconds(100));
-
-  BOOST_CHECK_EQUAL(face->m_sentInterests.size(), 0);
-  BOOST_CHECK_EQUAL(face->m_sentDatas.size(), 1);
-
-  chatroom.wireDecode(face->m_sentDatas[0].getContent().blockFromValue());
-  chatroom.setName(face->m_sentDatas[0].getName()
-                                      .get(ChatroomDiscoveryLogic::OFFSET_CHATROOM_NAME));
-
-  BOOST_CHECK_EQUAL(chatroom.getName(), chatroom2.getName());
-  BOOST_CHECK_EQUAL(chatroom.getParticipants().size(),
-                    chatroom2.getParticipants().size());
-  BOOST_CHECK_EQUAL(chatroom.getParticipants()[0].toUri(),
-                    chatroom2.getParticipants()[0].toUri());
-  BOOST_CHECK_EQUAL(chatroom.getParticipants()[1].toUri(),
-                    chatroom2.getParticipants()[1].toUri());
-  BOOST_CHECK_EQUAL(chatroom.getTrustModel(),
-                    chatroom2.getTrustModel());
-}
-
-BOOST_FIXTURE_TEST_CASE(refreshChatroomFunction, Fixture)
-{
-  ChatroomDiscoveryLogic chatroomDiscoveryLogic(face, bind(&Fixture::update, this, _1, _2));
-
-  ChatroomInfo chatroom1;
-  chatroom1.setName(ndn::Name::Component("lunch-talk"));
-  chatroom1.addParticipant(Name("/ndn/ucla/ymj"));
-  chatroom1.addParticipant(Name("/ndn/ucla/alice"));
-  chatroom1.setTrustModel(ChatroomInfo::TRUST_MODEL_WEBOFTRUST);
-  chatroomDiscoveryLogic.addLocalChatroom(chatroom1);
-
-  chatroomDiscoveryLogic.refreshChatroom(ndn::Name::Component("lunch-talk"));
-  face->processEvents(time::milliseconds(100));
-
-  BOOST_CHECK_EQUAL(face->m_sentInterests.size(), 2);
-  BOOST_CHECK_EQUAL(face->m_sentDatas.size(), 0);
-
-  Name name = ChatroomDiscoveryLogic::DISCOVERY_PREFIX;
-  name.append(Name("lunch-talk"));
-
-  BOOST_CHECK_EQUAL(face->m_sentInterests[1].getName().toUri(), name.toUri());
-  BOOST_CHECK_EQUAL(face->m_sentInterests[1].getExclude().size(), 0);
-}
-
-BOOST_FIXTURE_TEST_CASE(onReceiveData, Fixture)
-{
-  ChatroomDiscoveryLogic chatroomDiscoveryLogic(face, bind(&Fixture::update, this, _1, _2));
-
-  //discovery
-  Interest discovery(ChatroomDiscoveryLogic::DISCOVERY_PREFIX);
-  discovery.setMustBeFresh(true);
-  discovery.setInterestLifetime(time::milliseconds(10000));
-
-  Name dataName(ChatroomDiscoveryLogic::DISCOVERY_PREFIX);
-  dataName.append(ndn::Name::Component("lunch-talk"));
-
-  ChatroomInfo chatroom1;
-  chatroom1.setName(ndn::Name::Component("lunch-talk"));
-  chatroom1.addParticipant(Name("/ndn/ucla/ymj"));
-  chatroom1.addParticipant(Name("/ndn/ucla/alice"));
-  chatroom1.setTrustModel(ChatroomInfo::TRUST_MODEL_WEBOFTRUST);
-
-  shared_ptr<Data> chatroomInfo = make_shared<Data>(dataName);
-  chatroomInfo->setFreshnessPeriod(time::seconds(10));
-  chatroomInfo->setContent(chatroom1.wireEncode());
-
-  chatroomDiscoveryLogic.onReceiveData(discovery, *chatroomInfo, false);
-
-  face->processEvents(time::milliseconds(1000));
-
-  ndn::Name::Component chatroomName("lunch-talk");
-
-  BOOST_CHECK_EQUAL(chatroomDiscoveryLogic.getChatrooms().size(), 1);
-  BOOST_CHECK_EQUAL(chatroom1.getName(),
-                    chatroomDiscoveryLogic.getChatrooms().find(chatroomName)
-                    ->second.getName());
-  BOOST_CHECK_EQUAL(chatroom1.getParticipants().size(),
-                    chatroomDiscoveryLogic
-                    .getChatrooms().find(chatroomName)->second.getParticipants().size());
-  BOOST_CHECK_EQUAL(chatroom1.getParticipants()[0].toUri(),
-                    chatroomDiscoveryLogic
-                    .getChatrooms().find(chatroomName)->second
-                    .getParticipants()[0].toUri());
-  BOOST_CHECK_EQUAL(chatroom1.getParticipants()[1].toUri(),
-                    chatroomDiscoveryLogic
-                    .getChatrooms().find(chatroomName)->second
-                    .getParticipants()[1].toUri());
-  BOOST_CHECK_EQUAL(chatroom1.getTrustModel(),
-                    chatroomDiscoveryLogic
-                    .getChatrooms().find(chatroomName)->second.getTrustModel());
-
-  //refreshing
-  Name name = ChatroomDiscoveryLogic::DISCOVERY_PREFIX;
-  name.append(Name("lunch-talk"));
-
-  Interest refreshing(name);
-  refreshing.setMustBeFresh(true);
-  refreshing.setInterestLifetime(time::milliseconds(10000));
-
-  chatroomDiscoveryLogic.onReceiveData(discovery, *chatroomInfo, false);
-
-  face->processEvents(time::milliseconds(1000));
-
-  BOOST_CHECK_EQUAL(chatroomDiscoveryLogic.getChatrooms().size(), 1);
-  BOOST_CHECK_EQUAL(chatroom1.getName(),
-                    chatroomDiscoveryLogic.getChatrooms().find(chatroomName)
-                    ->second.getName());
-  BOOST_CHECK_EQUAL(chatroom1.getParticipants().size(),
-                    chatroomDiscoveryLogic
-                    .getChatrooms().find(chatroomName)->second.getParticipants().size());
-  BOOST_CHECK_EQUAL(chatroom1.getParticipants()[0].toUri(),
-                    chatroomDiscoveryLogic
-                    .getChatrooms().find(chatroomName)->second
-                    .getParticipants()[0].toUri());
-  BOOST_CHECK_EQUAL(chatroom1.getParticipants()[1].toUri(),
-                    chatroomDiscoveryLogic
-                    .getChatrooms().find(chatroomName)->second
-                    .getParticipants()[1].toUri());
-  BOOST_CHECK_EQUAL(chatroom1.getTrustModel(),
-                    chatroomDiscoveryLogic
-                    .getChatrooms().find(chatroomName)->second.getTrustModel());
-}
-
-BOOST_AUTO_TEST_SUITE_END()
-
-} // namespace test
-
-} // namespace chronos
diff --git a/test/test-chatroom-info.cpp b/test/test-chatroom-info.cpp
index a1b444e..39a5006 100644
--- a/test/test-chatroom-info.cpp
+++ b/test/test-chatroom-info.cpp
@@ -11,10 +11,19 @@
 BOOST_AUTO_TEST_SUITE(TestChatroomInfo)
 
 const uint8_t chatroomInfo[] = {
-  0x81, 0x2d, // ChatroomInfo
+  0x80, 0x5d, // ChatroomInfo
+    0x81, 0x06, // ChatroomName
+      0x08, 0x04,
+        0x06e, 0x64, 0x6e, 0x64,
     0x82, 0x01, // TrustModel
       0x01,
-    0x80, 0x14,// Participant1
+    0x83, 0x12, // ChatroomPrefix
+      0x07, 0x10,
+        0x08, 0x03,
+          0x6e, 0x64, 0x6e,
+        0x08, 0x09,
+          0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74,
+    0x84, 0x14, // ManagerPrefix
       0x07, 0x12,
         0x08, 0x03,
           0x6e, 0x64, 0x6e,
@@ -22,7 +31,14 @@
           0x75, 0x63, 0x6c, 0x61,
         0x08, 0x05,
           0x61, 0x6c, 0x69, 0x63, 0x65,
-    0x80, 0x12, // Participant2
+    0x85, 0x26,// Participants
+      0x07, 0x12,
+        0x08, 0x03,
+          0x6e, 0x64, 0x6e,
+        0x08, 0x04,
+          0x75, 0x63, 0x6c, 0x61,
+        0x08, 0x05,
+          0x61, 0x6c, 0x69, 0x63, 0x65,
       0x07, 0x10,
         0x08, 0x03,
           0x6e, 0x64, 0x6e,
@@ -34,17 +50,41 @@
 
 BOOST_AUTO_TEST_CASE(EncodeChatroom)
 {
-  //Chatroom := CHATROOM-TYPE TLV-LENGTH
-  //              TrustModel
-  //              Participant+
+
+  // ChatroomInfo := CHATROOM-INFO-TYPE TLV-LENGTH
+  //                   ChatroomName
+  //                   TrustModel
+  //                   ChatroomPrefix
+  //                   ManagerPrefix
+  //                   Participants
+  //
+  // ChatroomName := CHATROOM-NAME-TYPE TLV-LENGTH
+  //                   NameComponent
+  //
+  // TrustModel := TRUST-MODEL-TYPE TLV-LENGTH
+  //                 nonNegativeInteger
+  //
+  // ChatroomPrefix := CHATROOM-PREFIX-TYPE TLV-LENGTH
+  //                     Name
+  //
+  // ManagerPrefix := MANAGER-PREFIX-TYPE TLV-LENGTH
+  //                    Name
+  //
+  // Participants := PARTICIPANTS-TYPE TLV-LENGTH
+  //                   Name+
 
   ChatroomInfo chatroom;
-  chatroom.setName(ndn::Name::Component("lunch-talk"));
+  chatroom.setName(ndn::Name::Component("ndnd"));
+  chatroom.setManager("/ndn/ucla/alice");
+  chatroom.setSyncPrefix("/ndn/broadcast");
   chatroom.addParticipant(Name("/ndn/ucla/alice"));
   chatroom.addParticipant(Name("/ndn/ucla/ymj"));
+  chatroom.addParticipant(Name("/ndn/ucla"));
+  chatroom.removeParticipant(Name("/ndn/ucla"));
   chatroom.setTrustModel(ChatroomInfo::TRUST_MODEL_WEBOFTRUST);
 
   const Block& encoded = chatroom.wireEncode();
+
   Block chatroomInfoBlock(chatroomInfo, sizeof(chatroomInfo));
 
   BOOST_CHECK_EQUAL_COLLECTIONS(chatroomInfoBlock.wire(),
@@ -56,7 +96,9 @@
 BOOST_AUTO_TEST_CASE(DecodeChatroomCorrect)
 {
   ChatroomInfo chatroom;
-  chatroom.setName(ndn::Name::Component("lunch-talk"));
+  chatroom.setName(ndn::Name::Component("ndnd"));
+  chatroom.setManager("/ndn/ucla/alice");
+  chatroom.setSyncPrefix("/ndn/broadcast");
   chatroom.addParticipant(Name("/ndn/ucla/alice"));
   chatroom.addParticipant(Name("/ndn/ucla/ymj"));
   chatroom.setTrustModel(ChatroomInfo::TRUST_MODEL_WEBOFTRUST);
@@ -64,22 +106,33 @@
   Block chatroomInfoBlock(chatroomInfo, sizeof(chatroomInfo));
   ChatroomInfo dechatroom;
   dechatroom.wireDecode(chatroomInfoBlock);
-  dechatroom.setName(ndn::Name::Component("lunch-talk"));
 
   BOOST_CHECK_EQUAL(chatroom.getName(), dechatroom.getName());
+  BOOST_CHECK_EQUAL(chatroom.getSyncPrefix().toUri(), dechatroom.getSyncPrefix().toUri());
+  BOOST_CHECK_EQUAL(chatroom.getManagerPrefix().toUri(), dechatroom.getManagerPrefix().toUri());
   BOOST_CHECK_EQUAL(chatroom.getParticipants().size(), dechatroom.getParticipants().size());
-  BOOST_CHECK_EQUAL(chatroom.getParticipants()[0].toUri(), dechatroom.getParticipants()[0].toUri());
-  BOOST_CHECK_EQUAL(chatroom.getParticipants()[1].toUri(), dechatroom.getParticipants()[1].toUri());
-  BOOST_CHECK_EQUAL(chatroom.getTrustModel(), dechatroom.getTrustModel());
+  BOOST_CHECK_EQUAL(chatroom.getParticipants().begin()->toUri(),
+                    dechatroom.getParticipants().begin()->toUri());
+  BOOST_CHECK_EQUAL(chatroom.getParticipants().begin()->toUri(),
+                    dechatroom.getParticipants().begin()->toUri());
 }
 
 BOOST_AUTO_TEST_CASE(DecodeChatroomError)
 {
   const uint8_t error1[] = {
-    0x80, 0x2d, // Wrong ChatroomInfo Type (0x81, 0x2d)
+    0x81, 0x5d, // ChatroomInfo Type Error
+      0x81, 0x06, // ChatroomName
+        0x08, 0x04,
+          0x06e, 0x64, 0x6e, 0x64,
       0x82, 0x01, // TrustModel
         0x01,
-      0x80, 0x14,// Participant1
+      0x83, 0x12, // ChatroomPrefix
+        0x07, 0x10,
+          0x08, 0x03,
+            0x6e, 0x64, 0x6e,
+          0x08, 0x09,
+            0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74,
+      0x84, 0x14, // ManagerPrefix
         0x07, 0x12,
           0x08, 0x03,
             0x6e, 0x64, 0x6e,
@@ -87,7 +140,14 @@
             0x75, 0x63, 0x6c, 0x61,
           0x08, 0x05,
             0x61, 0x6c, 0x69, 0x63, 0x65,
-      0x80, 0x12, // Participant2
+      0x85, 0x26,// Participants
+        0x07, 0x12,
+          0x08, 0x03,
+            0x6e, 0x64, 0x6e,
+          0x08, 0x04,
+            0x75, 0x63, 0x6c, 0x61,
+          0x08, 0x05,
+            0x61, 0x6c, 0x69, 0x63, 0x65,
         0x07, 0x10,
           0x08, 0x03,
             0x6e, 0x64, 0x6e,
@@ -101,10 +161,19 @@
   BOOST_CHECK_THROW(ChatroomInfo chatroom(errorBlock1), ChatroomInfo::Error);
 
   const uint8_t error2[] = {
-    0x81, 0x2d, // ChatroomInfo
-      0x81, 0x01, // Wrong TrustModel Type (0x82, 0x01)
+    0x80, 0x5d, // ChatroomInfo
+      0x81, 0x06, // ChatroomName
+        0x08, 0x04,
+          0x06e, 0x64, 0x6e, 0x64,
+      0x83, 0x01, // TrustModel Type Error
         0x01,
-      0x80, 0x14,// Participant1
+      0x83, 0x12, // ChatroomPrefix
+        0x07, 0x10,
+          0x08, 0x03,
+            0x6e, 0x64, 0x6e,
+          0x08, 0x09,
+            0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74,
+      0x84, 0x14, // ManagerPrefix
         0x07, 0x12,
           0x08, 0x03,
             0x6e, 0x64, 0x6e,
@@ -112,7 +181,14 @@
             0x75, 0x63, 0x6c, 0x61,
           0x08, 0x05,
             0x61, 0x6c, 0x69, 0x63, 0x65,
-      0x80, 0x12, // Participant2
+      0x85, 0x26,// Participants
+        0x07, 0x12,
+          0x08, 0x03,
+            0x6e, 0x64, 0x6e,
+          0x08, 0x04,
+            0x75, 0x63, 0x6c, 0x61,
+          0x08, 0x05,
+            0x61, 0x6c, 0x69, 0x63, 0x65,
         0x07, 0x10,
           0x08, 0x03,
             0x6e, 0x64, 0x6e,
@@ -126,10 +202,19 @@
   BOOST_CHECK_THROW(ChatroomInfo chatroom(errorBlock2), ChatroomInfo::Error);
 
   const uint8_t error3[] = {
-    0x81, 0x2d, // ChatroomInfo
+    0x80, 0x5d, // ChatroomInfo
+      0x81, 0x06, // ChatroomName
+        0x08, 0x04,
+          0x06e, 0x64, 0x6e, 0x64,
       0x82, 0x01, // TrustModel
         0x01,
-      0x80, 0x14,// Participant1
+      0x80, 0x12, // ChatroomPrefix Type Error
+        0x07, 0x10,
+          0x08, 0x03,
+            0x6e, 0x64, 0x6e,
+          0x08, 0x09,
+            0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74,
+      0x84, 0x14, // ManagerPrefix
         0x07, 0x12,
           0x08, 0x03,
             0x6e, 0x64, 0x6e,
@@ -137,7 +222,14 @@
             0x75, 0x63, 0x6c, 0x61,
           0x08, 0x05,
             0x61, 0x6c, 0x69, 0x63, 0x65,
-      0x81, 0x12, // Wrong Participant Type (0x80, 0x12)
+      0x85, 0x26,// Participants
+        0x07, 0x12,
+          0x08, 0x03,
+            0x6e, 0x64, 0x6e,
+          0x08, 0x04,
+            0x75, 0x63, 0x6c, 0x61,
+          0x08, 0x05,
+            0x61, 0x6c, 0x69, 0x63, 0x65,
         0x07, 0x10,
           0x08, 0x03,
             0x6e, 0x64, 0x6e,
@@ -151,25 +243,116 @@
   BOOST_CHECK_THROW(ChatroomInfo chatroom(errorBlock3), ChatroomInfo::Error);
 
   const uint8_t error4[] = {
-    0x81, 0x00 // Empty ChatroomInfo
+    0x80, 0x5d, // ChatroomInfo
+      0x81, 0x06, // ChatroomName
+        0x08, 0x04,
+          0x06e, 0x64, 0x6e, 0x64,
+      0x82, 0x01, // TrustModel
+        0x01,
+      0x83, 0x12, // ChatroomPrefix
+        0x07, 0x10,
+          0x08, 0x03,
+            0x6e, 0x64, 0x6e,
+          0x08, 0x09,
+            0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74,
+      0x80, 0x14, // ManagerPrefix Error Type
+        0x07, 0x12,
+          0x08, 0x03,
+            0x6e, 0x64, 0x6e,
+          0x08, 0x04,
+            0x75, 0x63, 0x6c, 0x61,
+          0x08, 0x05,
+            0x61, 0x6c, 0x69, 0x63, 0x65,
+      0x85, 0x26,// Participants
+        0x07, 0x12,
+          0x08, 0x03,
+            0x6e, 0x64, 0x6e,
+          0x08, 0x04,
+            0x75, 0x63, 0x6c, 0x61,
+          0x08, 0x05,
+            0x61, 0x6c, 0x69, 0x63, 0x65,
+        0x07, 0x10,
+          0x08, 0x03,
+            0x6e, 0x64, 0x6e,
+          0x08, 0x04,
+            0x75, 0x63, 0x6c, 0x61,
+          0x08, 0x03,
+            0x79, 0x6d, 0x6a
   };
 
   Block errorBlock4(error4, sizeof(error4));
   BOOST_CHECK_THROW(ChatroomInfo chatroom(errorBlock4), ChatroomInfo::Error);
 
   const uint8_t error5[] = {
-    0x81, 0x03, // ChatroomInfo
+    0x80, 0x5d, // ChatroomInfo
+      0x81, 0x06, // ChatroomName
+        0x08, 0x04,
+          0x06e, 0x64, 0x6e, 0x64,
       0x82, 0x01, // TrustModel
-        0x01
-    //zero Participant
+        0x01,
+      0x83, 0x12, // ChatroomPrefix
+        0x07, 0x10,
+          0x08, 0x03,
+            0x6e, 0x64, 0x6e,
+          0x08, 0x09,
+            0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74,
+      0x84, 0x14, // ManagerPrefix
+        0x07, 0x12,
+          0x08, 0x03,
+            0x6e, 0x64, 0x6e,
+          0x08, 0x04,
+            0x75, 0x63, 0x6c, 0x61,
+          0x08, 0x05,
+            0x61, 0x6c, 0x69, 0x63, 0x65,
+      0x80, 0x26,// Participants Error Type
+        0x07, 0x12,
+          0x08, 0x03,
+            0x6e, 0x64, 0x6e,
+          0x08, 0x04,
+            0x75, 0x63, 0x6c, 0x61,
+          0x08, 0x05,
+            0x61, 0x6c, 0x69, 0x63, 0x65,
+        0x07, 0x10,
+          0x08, 0x03,
+            0x6e, 0x64, 0x6e,
+          0x08, 0x04,
+            0x75, 0x63, 0x6c, 0x61,
+          0x08, 0x03,
+            0x79, 0x6d, 0x6a
   };
 
   Block errorBlock5(error5, sizeof(error5));
   BOOST_CHECK_THROW(ChatroomInfo chatroom(errorBlock5), ChatroomInfo::Error);
+
+  const uint8_t error6[] = {
+    0x80, 0x00 // Empty ChatroomInfo
+  };
+
+  Block errorBlock6(error6, sizeof(error6));
+  BOOST_CHECK_THROW(ChatroomInfo chatroom(errorBlock6), ChatroomInfo::Error);
+
+  const uint8_t error7[] = {
+    0x80, 0x1f, // ChatroomInfo
+      0x81, 0x06, // ChatroomName
+        0x08, 0x04,
+          0x06e, 0x64, 0x6e, 0x64,
+      0x82, 0x01, // TrustModel
+        0x01,
+      0x83, 0x12, // ChatroomPrefix
+        0x07, 0x10,
+          0x08, 0x03,
+            0x6e, 0x64, 0x6e,
+          0x08, 0x09,
+            0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74,
+    // no Participant
+  };
+
+  Block errorBlock7(error7, sizeof(error7));
+  BOOST_CHECK_THROW(ChatroomInfo chatroom(errorBlock7), ChatroomInfo::Error);
 }
 
 BOOST_AUTO_TEST_SUITE_END()
 
-} //namespace test
+} // namespace test
 
-} //namespace chronos
+} // namespace chronos
