support various compression schemes

refs: #5061, #4917

Change-Id: Icba04b8693e40c4f065293b8d688ba32c63bd7bb
diff --git a/tests/test-full-producer.cpp b/tests/test-full-producer.cpp
index 2bd7db4..fc56a0c 100644
--- a/tests/test-full-producer.cpp
+++ b/tests/test-full-producer.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  The University of Memphis
+ * Copyright (c) 2014-2020,  The University of Memphis
  *
  * This file is part of PSync.
  * See AUTHORS.md for complete list of PSync authors and contributors.
@@ -65,6 +65,26 @@
   BOOST_CHECK_EQUAL(face.sentInterests.size(), 1);
 }
 
+BOOST_AUTO_TEST_CASE(OnSyncDataDecodeFailure)
+{
+  Name syncPrefix("/psync"), userNode("/testUser");
+  util::DummyClientFace face({true, true});
+
+  FullProducer node(40, face, syncPrefix, userNode, nullptr);
+
+  ndn::Name syncInterestName(syncPrefix);
+  node.m_iblt.appendToName(syncInterestName);
+  ndn::Interest syncInterest(syncInterestName);
+
+  auto badCompress = std::make_shared<const ndn::Buffer>(5);
+
+  BOOST_REQUIRE_NO_THROW(node.onSyncData(syncInterest, badCompress));
+
+  const uint8_t test[] = {'t', 'e', 's', 't'};
+  auto goodCompressBadBlock = compress(node.m_contentCompression, &test[0], sizeof(test));
+  BOOST_REQUIRE_NO_THROW(node.onSyncData(syncInterest, goodCompressBadBlock));
+}
+
 BOOST_AUTO_TEST_SUITE_END()
 
 } // namespace psync
\ No newline at end of file