diff --git a/test/chat-message.t.cpp b/test/chat-message.t.cpp
new file mode 100644
index 0000000..09ab127
--- /dev/null
+++ b/test/chat-message.t.cpp
@@ -0,0 +1,68 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2013, Regents of the University of California
+ *
+ * BSD license, See the LICENSE file for more information
+ *
+ * Author: Qiuhan Ding <qiuhanding@cs.ucla.edu>
+ */
+
+#include <boost/test/unit_test.hpp>
+
+#include "chat-message.hpp"
+#include <ndn-cxx/encoding/buffer-stream.hpp>
+
+namespace chronochat{
+namespace tests{
+
+using std::string;
+
+BOOST_AUTO_TEST_SUITE(TestChatMessage)
+
+BOOST_AUTO_TEST_CASE(EncodeDecode)
+{
+  string nick("qiuhan");
+  string chatroomName("test");
+  int32_t seconds =
+    static_cast<int32_t>(time::toUnixTimestamp(time::system_clock::now()).count() / 1000);
+  ChatMessage helloMsg;
+  helloMsg.setNick(nick);
+  helloMsg.setChatroomName(chatroomName);
+  helloMsg.setTimestamp(seconds);
+  helloMsg.setMsgType(ChatMessage::ChatMessageType::HELLO);
+
+  Block helloWire;
+  BOOST_REQUIRE_NO_THROW(helloWire = helloMsg.wireEncode());
+  ChatMessage decodedHelloMsg;
+  BOOST_REQUIRE_NO_THROW(decodedHelloMsg.wireDecode(helloWire));
+
+  BOOST_CHECK_EQUAL(decodedHelloMsg.getNick(), nick);
+  BOOST_CHECK_EQUAL(decodedHelloMsg.getChatroomName(), chatroomName);
+  BOOST_CHECK_EQUAL(decodedHelloMsg.getTimestamp(), seconds);
+  BOOST_CHECK_EQUAL(decodedHelloMsg.getMsgType(), ChatMessage::ChatMessageType::HELLO);
+
+  ChatMessage chatMsg;
+  string data = "This is for testing";
+  chatMsg.setNick(nick);
+  chatMsg.setChatroomName(chatroomName);
+  chatMsg.setTimestamp(seconds);
+  chatMsg.setData(data);
+  chatMsg.setMsgType(ChatMessage::ChatMessageType::CHAT);
+
+  Block chatWire;
+  BOOST_REQUIRE_NO_THROW(chatWire = chatMsg.wireEncode());
+  ChatMessage decodedChatMsg;
+  BOOST_REQUIRE_NO_THROW(decodedChatMsg.wireDecode(chatWire));
+
+  BOOST_CHECK_EQUAL(decodedChatMsg.getNick(), nick);
+  BOOST_CHECK_EQUAL(decodedChatMsg.getChatroomName(), chatroomName);
+  BOOST_CHECK_EQUAL(decodedChatMsg.getTimestamp(), seconds);
+  BOOST_CHECK_EQUAL(decodedChatMsg.getData(), data);
+  BOOST_CHECK_EQUAL(decodedChatMsg.getMsgType(), ChatMessage::ChatMessageType::CHAT);
+
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+
+} // namespace tests
+} // namespace chronochat
diff --git a/test/conf.t.cpp b/test/conf.t.cpp
new file mode 100644
index 0000000..9af3e5d
--- /dev/null
+++ b/test/conf.t.cpp
@@ -0,0 +1,42 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2013, Regents of the University of California
+ *
+ * BSD license, See the LICENSE file for more information
+ *
+ * Author: Qiuhan Ding <qiuhanding@cs.ucla.edu>
+ */
+
+#include <boost/test/unit_test.hpp>
+
+#include "conf.hpp"
+#include <ndn-cxx/encoding/buffer-stream.hpp>
+
+namespace chronochat{
+namespace tests {
+
+using std::string;
+
+BOOST_AUTO_TEST_SUITE(TestConf)
+
+BOOST_AUTO_TEST_CASE(EncodeDecode)
+{
+  string nick("qiuhan");
+  Name identity("/ndn/edu/ucla/qiuhan");
+  Conf conf;
+  conf.setIdentity(identity);
+  conf.setNick(nick);
+
+  Block confWire;
+  BOOST_REQUIRE_NO_THROW(confWire = conf.wireEncode());
+  Conf decodedConf;
+  BOOST_REQUIRE_NO_THROW(decodedConf.wireDecode(confWire));
+
+  BOOST_CHECK_EQUAL(decodedConf.getNick(), nick);
+  BOOST_CHECK_EQUAL(decodedConf.getIdentity(), identity);
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+
+} // namespace tests
+} // namespace chronochat
diff --git a/test/endorse-certificate.t.cpp b/test/endorse-certificate.t.cpp
index 8d97173..5fa5c79 100644
--- a/test/endorse-certificate.t.cpp
+++ b/test/endorse-certificate.t.cpp
@@ -65,24 +65,19 @@
 iwIBEQ==");
 
 const string testEndorseCert("\
-Bv0DOgePCBdFbmRvcnNlQ2VydGlmaWNhdGVUZXN0cwgMRW5jb2RlRGVjb2RlCBFr\
-c2stMTM5NDA3MjE0NzMzNQgMUFJPRklMRS1DRVJUCDwHOggXRW5kb3JzZUNlcnRp\
-ZmljYXRlVGVzdHMIDEVuY29kZURlY29kZQgRa3NrLTEzOTQwNzIxNDczMzUIB/0B\
-RJVWq1kUAxgBAhX9AnkwggJ1MCIYDzIwMTQwMzA2MDIxNTQ3WhgPMjAxNDAzMTMw\
-OTI3NDdaMEAwPgYDVQQpEzcvRW5kb3JzZUNlcnRpZmljYXRlVGVzdHMvRW5jb2Rl\
-RGVjb2RlL2tzay0xMzk0MDcyMTQ3MzM1MIIBIDANBgkqhkiG9w0BAQEFAAOCAQ0A\
-MIIBCAKCAQEA2LFg9IsUBUX2LN+gRzbETb+aLhC+vaGkul1/4bEDdQcuETSOnkhu\
-Q6Wo7QMCtcvg1z8JCx3eUga78C80Xhe0rKxdjm2sM51NeBimkHW5/nlSBEewlr0q\
-SYR+cikuHwj0Tfm9TD/EEgy72mhrteU/fHIFbHCBKhZC351kkG3TehJ6HYzh9uyZ\
-AQs/C8b/RmS64XyhszspUXy87wiMiF2Jeh1q6DvsUyUGj/pokmTVRsn+I2Ks+Vm0\
-B+emvWY1JXU6YY7g2wY1KkGjVTs6Ck/h+KofJp9/fWkPfwYzPuv1oK0sO/zDtlAo\
-KGYckkGOB1as1FVVp2MDlDWD6Dktx3bxiwIBETCB6DCBwAYHKwYBBSACAQEB/wSB\
-sQoxCghJREVOVElUWRIlL0VuZG9yc2VDZXJ0aWZpY2F0ZVRlc3RzL0VuY29kZURl\
-Y29kZQoUCgdhZHZpc29yEglNeUFkdmlzb3IKEAoFZW1haWwSB015RW1haWwKEAoF\
-Z3JvdXASB015R3JvdXAKFgoIaG9tZXBhZ2USCk15SG9tZVBhZ2UKGgoLaW5zdGl0\
-dXRpb24SC015SW5zdGl0dXRlCg4KBG5hbWUSBk15TmFtZTAjBgcrBgEFIAICAQH/\
-BBUKBwoFZW1haWwKCgoIaG9tZXBhZ2UWAxsBABcgS7pYcBk1e4dlsag8minK+UzI\
-L8ViVS87k09gaM6GeUA=");
+Bv0CYweICBdFbmRvcnNlQ2VydGlmaWNhdGVUZXN0cwgMRW5jb2RlRGVjb2RlCBFr\
+c2stMTM5NDA3MjE0NzMzNQgMUFJPRklMRS1DRVJUCDMHMQgXRW5kb3JzZUNlcnRp\
+ZmljYXRlVGVzdHMIBlNpbmdlcggOa3NrLTEyMzQ1Njc4OTAICf0AAAFMoXR8NRQD\
+GAECFf0BqTCCAaUwIhgPMjAxMzEyMjYyMzIyNTRaGA8yMDEzMTIyNjIzMjI1NFow\
+QDA+BgNVBCkTNy9FbmRvcnNlQ2VydGlmaWNhdGVUZXN0cy9FbmNvZGVEZWNvZGUv\
+a3NrLTEzOTQwNzIxNDczMzUwgZ0wDQYJKoZIhvcNAQEBBQADgYsAMIGHAoGBAJ4G\
+PkeFsjQ3qoVHrAMkg7WcqAU6JB7riQG76ZuywyKsaOPwbALOaKbE0KcGkJyqGwgd\
+i0OaM2dEbSGjG4ial15ZxBUL2Sy9UQdhgq3BuNe/m899JMJj85cX6/5iJbpbTYrC\
+er1Dio+48vHFajDTUIzImt/v7TXnemLqdny7CCbHAgERMIGcMGsGBysGAQUgAgEB\
+Af8EXYhbiTGKCElERU5USVRZiyUvRW5kb3JzZUNlcnRpZmljYXRlVGVzdHMvRW5j\
+b2RlRGVjb2RliRaKCGhvbWVwYWdliwpNeUhvbWVQYWdliQ6KBG5hbWWLBk15TmFt\
+ZTAtBgcrBgEFIAICAQH/BB+MHYsLaW5zdGl0dXRpb26LBWdyb3VwiwdhZHZpc29y\
+FgMbAQAXIHalD2NUzM7abX6QY+2qWNLVMC+ch2xnVyrlf89ZH/IV");
 
 BOOST_AUTO_TEST_CASE(IdCert)
 {
diff --git a/test/endorse-collection.t.cpp b/test/endorse-collection.t.cpp
new file mode 100644
index 0000000..1af3f6b
--- /dev/null
+++ b/test/endorse-collection.t.cpp
@@ -0,0 +1,41 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2013, Regents of the University of California
+ *
+ * BSD license, See the LICENSE file for more information
+ *
+ * Author: Qiuhan Ding <qiuhanding@cs.ucla.edu>
+ */
+
+#include <boost/test/unit_test.hpp>
+
+#include "endorse-collection.hpp"
+#include <ndn-cxx/encoding/buffer-stream.hpp>
+
+namespace chronochat{
+namespace tests {
+
+using std::string;
+
+BOOST_AUTO_TEST_SUITE(TestEndorseCollection)
+
+BOOST_AUTO_TEST_CASE(EncodeDecode)
+{
+  EndorseCollection collection;
+  collection.addCollectionEntry(ndn::Name("/ndn/ucla/qiuhan"), "hash");
+  Block collectionWire;
+  BOOST_REQUIRE_NO_THROW(collectionWire = collection.wireEncode());
+  EndorseCollection decodedCollection;
+  BOOST_REQUIRE_NO_THROW(decodedCollection.wireDecode(collectionWire));
+
+  BOOST_CHECK_EQUAL(decodedCollection.getCollectionEntries().size(), 1);
+  BOOST_CHECK_EQUAL(decodedCollection.getCollectionEntries()[0].certName.toUri(),
+                    string("/ndn/ucla/qiuhan"));
+  BOOST_CHECK_EQUAL(decodedCollection.getCollectionEntries()[0].hash, "hash");
+
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+
+} // namespace tests
+} // namespace chronochat
diff --git a/test/profile.t.cpp b/test/profile.t.cpp
index c003c70..3e85f38 100644
--- a/test/profile.t.cpp
+++ b/test/profile.t.cpp
@@ -24,17 +24,10 @@
   profile["name"] = "Yingdi Yu";
   profile["school"] = "UCLA";
 
-  ndn::OBufferStream os;
-  profile.encode(os);
-
-  ndn::ConstBufferPtr encoded = os.buf();
-
-  boost::iostreams::stream
-    <boost::iostreams::array_source> is(reinterpret_cast<const char*>(encoded->buf()),
-                                        encoded->size ());
+  Block profileWire = profile.wireEncode();
 
   Profile decodedProfile;
-  decodedProfile.decode(is);
+  decodedProfile.wireDecode(profileWire);
 
   BOOST_CHECK_EQUAL(decodedProfile.getIdentityName().toUri(), string("/ndn/ucla/yingdi"));
   BOOST_CHECK_EQUAL(decodedProfile["name"], string("Yingdi Yu"));
