diff --git a/tests/unit-tests/bench.t.cpp b/tests/unit-tests/bench.t.cpp
index 28850a8..09986c6 100644
--- a/tests/unit-tests/bench.t.cpp
+++ b/tests/unit-tests/bench.t.cpp
@@ -19,9 +19,9 @@
  */
 
 #include "ca-module.hpp"
-#include "requester.hpp"
 #include "challenge-modules/challenge-pin.hpp"
 #include "protocol-detail/info.hpp"
+#include "requester.hpp"
 #include "test-common.hpp"
 
 namespace ndn {
@@ -38,12 +38,26 @@
 
   util::DummyClientFace face(io, m_keyChain, {true, true});
   CaModule ca(face, m_keyChain, "tests/unit-tests/config-files/config-ca-1", "ca-storage-memory");
+  auto metaData = ca.generateCaConfigMetaData();
+  auto profileData = ca.generateCaConfigData();
   advanceClocks(time::milliseconds(20), 60);
 
   Interest interest = MetadataObject::makeDiscoveryInterest(Name("/ndn/CA/INFO"));
   std::cout << "CA Config discovery Interest Size: " << interest.wireEncode().size() << std::endl;
   shared_ptr<Interest> infoInterest = nullptr;
 
+  face.setInterestFilter(InterestFilter("/ndn/CA/INFO"),
+                         [&](const auto&, const Interest& interest) {
+                           if (interest.matchesData(*metaData)) {
+                             face.put(*metaData);
+                           }
+                           else {
+                             BOOST_CHECK(interest.matchesData(*profileData));
+                             face.put(*profileData);
+                           }
+                         }, nullptr, nullptr);
+  advanceClocks(time::milliseconds(20), 60);
+
   int count = 0;
   face.onSendData.connect([&](const Data& response) {
     if (count == 0) {
@@ -55,7 +69,6 @@
       interest.setCanBePrefix(true);
       infoInterest = make_shared<Interest>(interest);
       std::cout << "CA Config fetch Interest Size: " << infoInterest->wireEncode().size() << std::endl;
-
     }
     else {
       count++;
