diff --git a/tests/test-full-sync.cpp b/tests/test-full-sync.cpp
index 34bef0c..1f5c6bb 100644
--- a/tests/test-full-sync.cpp
+++ b/tests/test-full-sync.cpp
@@ -398,16 +398,26 @@
 {
   addNode(0);
 
-  for (int i = 0; i < 2000; i++) {
-    Name prefixToPublish("userNode0-" + to_string(i));
+  int i = 0;
+  State state;
+
+  std::shared_ptr<ndn::Buffer> compressed;
+  do {
+    Name prefixToPublish("userNode0-" + to_string(i++));
     nodes[0]->addUserNode(prefixToPublish);
     nodes[0]->publishName(prefixToPublish);
-  }
+
+    state.addContent(ndn::Name(prefixToPublish).appendNumber(nodes[0]->m_prefixes[prefixToPublish]));
+
+    auto block = state.wireEncode();
+    compressed = compress(nodes[0]->m_contentCompression, block.wire(), block.size());
+
+  } while (compressed->size() < (ndn::MAX_NDN_PACKET_SIZE >> 1));
 
   advanceClocks(ndn::time::milliseconds(10), 100);
 
   Name syncInterestName(syncPrefix);
-  IBLT iblt(40);
+  IBLT iblt(40, nodes[0]->m_ibltCompression);
   iblt.appendToName(syncInterestName);
 
   nodes[0]->onSyncInterest(syncPrefix, Interest(syncInterestName));
diff --git a/tests/test-iblt.cpp b/tests/test-iblt.cpp
index 5be1d80..e99bf6e 100644
--- a/tests/test-iblt.cpp
+++ b/tests/test-iblt.cpp
@@ -34,8 +34,8 @@
 {
   int size = 10;
 
-  IBLT iblt1(size);
-  IBLT iblt2(size);
+  IBLT iblt1(size, CompressionScheme::DEFAULT);
+  IBLT iblt2(size, CompressionScheme::DEFAULT);
   BOOST_CHECK_EQUAL(iblt1, iblt2);
 
   std::string prefix = Name("/test/memphis").appendNumber(1).toUri();
@@ -55,7 +55,7 @@
 {
   int size = 10;
 
-  IBLT iblt(size);
+  IBLT iblt(size, CompressionScheme::DEFAULT);
   std::string prefix = Name("/test/memphis").appendNumber(1).toUri();
   uint32_t newHash = murmurHash3(11, prefix);
   iblt.insert(newHash);
@@ -63,12 +63,12 @@
   Name ibltName("sync");
   iblt.appendToName(ibltName);
 
-  IBLT rcvd(size);
+  IBLT rcvd(size, CompressionScheme::DEFAULT);
   rcvd.initialize(ibltName.get(-1));
 
   BOOST_CHECK_EQUAL(iblt, rcvd);
 
-  IBLT rcvdDiffSize(20);
+  IBLT rcvdDiffSize(20, CompressionScheme::DEFAULT);
   BOOST_CHECK_THROW(rcvdDiffSize.initialize(ibltName.get(-1)), std::runtime_error);
 }
 
@@ -76,7 +76,7 @@
 {
   int size = 10;
 
-  IBLT iblt1(size);
+  IBLT iblt1(size, CompressionScheme::DEFAULT);
 
   std::string prefix = Name("/test/memphis").appendNumber(1).toUri();
   uint32_t hash1 = murmurHash3(11, prefix);
@@ -105,8 +105,8 @@
   // Relevant to full sync case
   int size = 10;
 
-  IBLT ownIBF(size);
-  IBLT rcvdIBF(size);
+  IBLT ownIBF(size, CompressionScheme::DEFAULT);
+  IBLT rcvdIBF(size, CompressionScheme::DEFAULT);
 
   std::string prefix = Name("/test/memphis").appendNumber(3).toUri();
   uint32_t hash1 = murmurHash3(11, prefix);
@@ -129,7 +129,7 @@
 {
   int size = 10;
 
-  IBLT ownIBF(size);
+  IBLT ownIBF(size, CompressionScheme::DEFAULT);
 
   IBLT rcvdIBF = ownIBF;
 
@@ -169,7 +169,7 @@
 
   int size = 10;
 
-  IBLT ownIBF(size);
+  IBLT ownIBF(size, CompressionScheme::DEFAULT);
 
   for (int i = 0; i < 50; i++) {
     std::string prefix = Name("/test/memphis" + std::to_string(i)).appendNumber(1).toUri();
diff --git a/tests/test-state.cpp b/tests/test-state.cpp
index 25626c4..6d7239c 100644
--- a/tests/test-state.cpp
+++ b/tests/test-state.cpp
@@ -74,6 +74,20 @@
   BOOST_CHECK_EQUAL(state2.getContent().size(), 0);
 }
 
+BOOST_AUTO_TEST_CASE(ReEncode)
+{
+  State state;
+  state.addContent(ndn::Name("test1"));
+  state.addContent(ndn::Name("test2"));
+
+  state.wireEncode();
+
+  state.addContent(ndn::Name("test3"));
+
+  State state2(state.wireEncode());
+  BOOST_CHECK_EQUAL(state2.getContent().size(), 3);
+}
+
 BOOST_AUTO_TEST_SUITE_END()
 
 } // namespace psync
\ No newline at end of file
