diff --git a/tests/chunks/consumer.t.cpp b/tests/chunks/consumer.t.cpp
index 84dcb5b..9ae1ad8 100644
--- a/tests/chunks/consumer.t.cpp
+++ b/tests/chunks/consumer.t.cpp
@@ -136,11 +136,7 @@
 class PipelineInterestsDummy : public PipelineInterests
 {
 public:
-  PipelineInterestsDummy(Face& face)
-    : PipelineInterests(face)
-    , isPipelineRunning(false)
-  {
-  }
+  using PipelineInterests::PipelineInterests;
 
 private:
   void
@@ -155,18 +151,19 @@
   }
 
 public:
-  bool isPipelineRunning;
+  bool isPipelineRunning = false;
 };
 
 BOOST_FIXTURE_TEST_CASE(RunBasic, UnitTestTimeFixture)
 {
   boost::asio::io_service io;
   util::DummyClientFace face(io);
+  Options options;
   Consumer consumer(security::v2::getAcceptAllValidator());
 
   Name prefix = Name("/ndn/chunks/test").appendVersion(1);
-  auto discover = make_unique<DiscoverVersion>(prefix, face, Options());
-  auto pipeline = make_unique<PipelineInterestsDummy>(face);
+  auto discover = make_unique<DiscoverVersion>(face, prefix, options);
+  auto pipeline = make_unique<PipelineInterestsDummy>(face, options);
   auto pipelinePtr = pipeline.get();
 
   consumer.run(std::move(discover), std::move(pipeline));
diff --git a/tests/chunks/discover-version.t.cpp b/tests/chunks/discover-version.t.cpp
index 25754fd..eb94f1d 100644
--- a/tests/chunks/discover-version.t.cpp
+++ b/tests/chunks/discover-version.t.cpp
@@ -41,28 +41,18 @@
                                public IdentityManagementFixture
 {
 public:
-  DiscoverVersionFixture()
-    : face(io)
-    , name("/ndn/chunks/test")
-    , isDiscoveryFinished(false)
-    , version(1449227841747)
-  {
-    opt.interestLifetime = ndn::DEFAULT_INTEREST_LIFETIME;
-    opt.maxRetriesOnTimeoutOrNack = 15;
-    opt.isVerbose = false;
-  }
-
   void
   run(const Name& prefix)
   {
     BOOST_REQUIRE(!prefix.empty());
-    discover = make_unique<DiscoverVersion>(prefix, face, opt);
+
+    discover = make_unique<DiscoverVersion>(face, prefix, opt);
     discover->onDiscoverySuccess.connect([this] (const Name& versionedName) {
-      isDiscoveryFinished = true;
       BOOST_REQUIRE(!versionedName.empty() && versionedName[-1].isVersion());
       discoveredVersion = versionedName[-1].toVersion();
+      isDiscoveryFinished = true;
     });
-    discover->onDiscoveryFailure.connect([this] (const std::string& reason) {
+    discover->onDiscoveryFailure.connect([this] (const std::string&) {
       isDiscoveryFinished = true;
     });
 
@@ -72,13 +62,13 @@
 
 protected:
   boost::asio::io_service io;
-  util::DummyClientFace face;
-  Name name;
+  util::DummyClientFace face{io};
+  Name name = "/ndn/chunks/test";
+  Options opt;
   unique_ptr<DiscoverVersion> discover;
   optional<uint64_t> discoveredVersion;
-  bool isDiscoveryFinished;
-  uint64_t version;
-  Options opt;
+  bool isDiscoveryFinished = false;
+  uint64_t version = 1449227841747;
 };
 
 BOOST_AUTO_TEST_SUITE(Chunks)
diff --git a/tests/chunks/pipeline-interests-aimd.t.cpp b/tests/chunks/pipeline-interests-aimd.t.cpp
index d0d0bb0..efb634a 100644
--- a/tests/chunks/pipeline-interests-aimd.t.cpp
+++ b/tests/chunks/pipeline-interests-aimd.t.cpp
@@ -26,7 +26,6 @@
  */
 
 #include "tools/chunks/catchunks/pipeline-interests-aimd.hpp"
-#include "tools/chunks/catchunks/options.hpp"
 
 #include "pipeline-interests-fixture.hpp"
 
@@ -40,9 +39,9 @@
 {
 public:
   PipelineInterestAimdFixture()
-    : opt(makePipelineOptions())
-    , rttEstimator(makeRttEstimatorOptions())
+    : rttEstimator(makeRttEstimatorOptions())
   {
+    opt.isQuiet = true;
     createPipeline();
   }
 
@@ -55,22 +54,6 @@
   }
 
 private:
-  static PipelineInterestsAdaptive::Options
-  makePipelineOptions()
-  {
-    PipelineInterestsAdaptive::Options pipelineOptions;
-    pipelineOptions.isQuiet = true;
-    pipelineOptions.isVerbose = false;
-    pipelineOptions.disableCwa = false;
-    pipelineOptions.ignoreCongMarks = false;
-    pipelineOptions.resetCwndToInit = false;
-    pipelineOptions.initCwnd = 1.0;
-    pipelineOptions.aiStep = 1.0;
-    pipelineOptions.mdCoef = 0.5;
-    pipelineOptions.initSsthresh = std::numeric_limits<int>::max();
-    return pipelineOptions;
-  }
-
   static shared_ptr<RttEstimatorWithStats::Options>
   makeRttEstimatorOptions()
   {
@@ -86,7 +69,7 @@
   }
 
 protected:
-  PipelineInterestsAdaptive::Options opt;
+  Options opt;
   RttEstimatorWithStats rttEstimator;
   PipelineInterestsAdaptive* pipeline;
   static constexpr double MARGIN = 0.001;
diff --git a/tests/chunks/pipeline-interests-cubic.t.cpp b/tests/chunks/pipeline-interests-cubic.t.cpp
index 0d2edf0..6cfa23e 100644
--- a/tests/chunks/pipeline-interests-cubic.t.cpp
+++ b/tests/chunks/pipeline-interests-cubic.t.cpp
@@ -26,7 +26,6 @@
  */
 
 #include "tools/chunks/catchunks/pipeline-interests-cubic.hpp"
-#include "tools/chunks/catchunks/options.hpp"
 
 #include "pipeline-interests-fixture.hpp"
 
@@ -40,9 +39,9 @@
 {
 public:
   PipelineInterestCubicFixture()
-    : opt(makePipelineOptions())
-    , rttEstimator(makeRttEstimatorOptions())
+    : rttEstimator(makeRttEstimatorOptions())
   {
+    opt.isQuiet = true;
     createPipeline();
   }
 
@@ -55,24 +54,6 @@
   }
 
 private:
-  static PipelineInterestsCubic::Options
-  makePipelineOptions()
-  {
-    PipelineInterestsCubic::Options pipelineOptions;
-    pipelineOptions.isQuiet = true;
-    pipelineOptions.isVerbose = false;
-    pipelineOptions.disableCwa = false;
-    pipelineOptions.ignoreCongMarks = false;
-    pipelineOptions.resetCwndToInit = false;
-    pipelineOptions.initCwnd = 1.0;
-    pipelineOptions.aiStep = 1.0;
-    pipelineOptions.mdCoef = 0.5;
-    pipelineOptions.initSsthresh = std::numeric_limits<int>::max();
-    pipelineOptions.cubicBeta = 0.7;
-    pipelineOptions.enableFastConv = false;
-    return pipelineOptions;
-  }
-
   static shared_ptr<RttEstimatorWithStats::Options>
   makeRttEstimatorOptions()
   {
@@ -88,7 +69,7 @@
   }
 
 protected:
-  PipelineInterestsCubic::Options opt;
+  Options opt;
   RttEstimatorWithStats rttEstimator;
   PipelineInterestsCubic* pipeline;
   static constexpr double MARGIN = 0.001;
diff --git a/tests/chunks/pipeline-interests-fixed.t.cpp b/tests/chunks/pipeline-interests-fixed.t.cpp
index 12610be..f4979a2 100644
--- a/tests/chunks/pipeline-interests-fixed.t.cpp
+++ b/tests/chunks/pipeline-interests-fixed.t.cpp
@@ -37,8 +37,11 @@
 {
 public:
   PipelineInterestFixedFixture()
-    : opt(makeOptions())
   {
+    opt.interestLifetime = 1_s;
+    opt.maxRetriesOnTimeoutOrNack = 3;
+    opt.isQuiet = true;
+    opt.maxPipelineSize = 5;
     createPipeline();
   }
 
@@ -50,21 +53,8 @@
     setPipeline(std::move(pline));
   }
 
-private:
-  static PipelineInterestsFixed::Options
-  makeOptions()
-  {
-    PipelineInterestsFixed::Options options;
-    options.isQuiet = true;
-    options.isVerbose = false;
-    options.interestLifetime = time::seconds(1);
-    options.maxRetriesOnTimeoutOrNack = 3;
-    options.maxPipelineSize = 5;
-    return options;
-  }
-
 protected:
-  PipelineInterestsFixed::Options opt;
+  Options opt;
   PipelineInterestsFixed* pipeline;
 };
 
