diff --git a/tests/chunks/consumer.t.cpp b/tests/chunks/consumer.t.cpp
index 0ce7290..158148a 100644
--- a/tests/chunks/consumer.t.cpp
+++ b/tests/chunks/consumer.t.cpp
@@ -24,6 +24,8 @@
  */
 
 #include "tools/chunks/catchunks/consumer.hpp"
+#include "tools/chunks/catchunks/discover-version.hpp"
+#include "tools/chunks/catchunks/pipeline-interests.hpp"
 
 #include "tests/test-common.hpp"
 #include <ndn-cxx/util/dummy-client-face.hpp>
@@ -65,7 +67,7 @@
   util::DummyClientFace face;
   ValidatorNull validator;
   output_test_stream output("");
-  Consumer cons(face, validator, false, output);
+  Consumer cons(validator, false, output);
 
   auto interest = makeInterest(name);
 
@@ -105,7 +107,7 @@
   util::DummyClientFace face;
   ValidatorNull validator;
   output_test_stream output("");
-  Consumer cons(face, validator, false, output);
+  Consumer cons(validator, false, output);
 
   auto interest = makeInterest(name);
   std::vector<shared_ptr<Data>> dataStore;
@@ -134,6 +136,90 @@
   BOOST_CHECK(output.is_equal(testStrings[2]));
 }
 
+class DiscoverVersionDummy : public DiscoverVersion
+{
+public:
+  DiscoverVersionDummy(const Name& prefix, Face& face, const Options& options)
+    : DiscoverVersion(prefix, face, options)
+    , isDiscoverRunning(false)
+    , m_prefix(prefix)
+  {
+  }
+
+  void
+  run() final
+  {
+    isDiscoverRunning = true;
+
+    auto interest = makeInterest(m_prefix);
+    expressInterest(*interest, 1, 1);
+  }
+
+private:
+  void
+  handleData(const Interest& interest, const Data& data) final
+  {
+    this->emitSignal(onDiscoverySuccess, data);
+  }
+
+public:
+  bool isDiscoverRunning;
+
+private:
+  Name m_prefix;
+};
+
+class PipelineInterestsDummy : public PipelineInterests
+{
+public:
+  PipelineInterestsDummy(Face& face)
+    : PipelineInterests(face)
+    , isPipelineRunning(false)
+  {
+  }
+
+private:
+  void
+  doRun() final
+  {
+    isPipelineRunning = true;
+  }
+
+  void
+  doCancel() final
+  {
+  }
+
+public:
+  bool isPipelineRunning;
+};
+
+BOOST_FIXTURE_TEST_CASE(RunBasic, UnitTestTimeFixture)
+{
+  boost::asio::io_service io;
+  util::DummyClientFace face(io);
+  ValidatorNull validator;
+  Consumer consumer(validator, false);
+
+  Name prefix("/ndn/chunks/test");
+  auto discover = make_unique<DiscoverVersionDummy>(prefix, face, Options());
+  auto pipeline = make_unique<PipelineInterestsDummy>(face);
+  auto discoverPtr = discover.get();
+  auto pipelinePtr = pipeline.get();
+
+  consumer.run(std::move(discover), std::move(pipeline));
+  BOOST_CHECK_EQUAL(discoverPtr->isDiscoverRunning, true);
+
+  this->advanceClocks(io, time::nanoseconds(1));
+  BOOST_REQUIRE_EQUAL(face.sentInterests.size(), 1);
+
+  auto data = makeData(prefix.appendSegment(0));
+  face.receive(*data);
+
+  this->advanceClocks(io, time::nanoseconds(1));
+  BOOST_CHECK_EQUAL(pipelinePtr->isPipelineRunning, true);
+}
+
 BOOST_AUTO_TEST_SUITE_END() // TestConsumer
 BOOST_AUTO_TEST_SUITE_END() // Chunks
 
diff --git a/tools/chunks/catchunks/consumer.cpp b/tools/chunks/catchunks/consumer.cpp
index fe30f75..6ecd630 100644
--- a/tools/chunks/catchunks/consumer.cpp
+++ b/tools/chunks/catchunks/consumer.cpp
@@ -30,9 +30,8 @@
 namespace ndn {
 namespace chunks {
 
-Consumer::Consumer(Face& face, Validator& validator, bool isVerbose, std::ostream& os)
-  : m_face(face)
-  , m_validator(validator)
+Consumer::Consumer(Validator& validator, bool isVerbose, std::ostream& os)
+  : m_validator(validator)
   , m_outputStream(os)
   , m_nextToPrint(0)
   , m_isVerbose(isVerbose)
@@ -47,11 +46,9 @@
   m_nextToPrint = 0;
   m_bufferedData.clear();
 
-  discover->onDiscoverySuccess.connect(bind(&Consumer::startPipeline, this, _1));
-  discover->onDiscoveryFailure.connect(bind(&Consumer::onFailure, this, _1));
-  discover->run();
-
-  m_face.processEvents();
+  m_discover->onDiscoverySuccess.connect(bind(&Consumer::startPipeline, this, _1));
+  m_discover->onDiscoveryFailure.connect(bind(&Consumer::onFailure, this, _1));
+  m_discover->run();
 }
 
 void
diff --git a/tools/chunks/catchunks/consumer.hpp b/tools/chunks/catchunks/consumer.hpp
index e2451be..9996c14 100644
--- a/tools/chunks/catchunks/consumer.hpp
+++ b/tools/chunks/catchunks/consumer.hpp
@@ -59,7 +59,7 @@
   /**
    * @brief Create the consumer
    */
-  Consumer(Face& face, Validator& validator, bool isVerbose, std::ostream& os = std::cout);
+  Consumer(Validator& validator, bool isVerbose, std::ostream& os = std::cout);
 
   /**
    * @brief Run the consumer
@@ -85,7 +85,6 @@
   writeInOrderData();
 
 private:
-  Face& m_face;
   Validator& m_validator;
   std::ostream& m_outputStream;
   unique_ptr<DiscoverVersion> m_discover;
diff --git a/tools/chunks/catchunks/ndncatchunks.cpp b/tools/chunks/catchunks/ndncatchunks.cpp
index 98839b3..c877eaa 100644
--- a/tools/chunks/catchunks/ndncatchunks.cpp
+++ b/tools/chunks/catchunks/ndncatchunks.cpp
@@ -164,11 +164,12 @@
     }
 
     ValidatorNull validator;
-    Consumer consumer(face, validator, options.isVerbose);
+    Consumer consumer(validator, options.isVerbose);
 
     BOOST_ASSERT(discover != nullptr);
     BOOST_ASSERT(pipeline != nullptr);
     consumer.run(std::move(discover), std::move(pipeline));
+    face.processEvents();
   }
   catch (const Consumer::ApplicationNackError& e) {
     std::cerr << "ERROR: " << e.what() << std::endl;
