diff --git a/tests/chunks/discover-version-fixed.t.cpp b/tests/chunks/discover-version-fixed.t.cpp
index 8f76153..2017c52 100644
--- a/tests/chunks/discover-version-fixed.t.cpp
+++ b/tests/chunks/discover-version-fixed.t.cpp
@@ -1,8 +1,8 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2016,  Regents of the University of California,
- *                      Colorado State University,
- *                      University Pierre & Marie Curie, Sorbonne University.
+/*
+ * Copyright (c) 2016-2018, Regents of the University of California,
+ *                          Colorado State University,
+ *                          University Pierre & Marie Curie, Sorbonne University.
  *
  * This file is part of ndn-tools (Named Data Networking Essential Tools).
  * See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -43,7 +43,7 @@
   }
 
 protected:
-  uint64_t version; //Version to find
+  uint64_t version; // version to find
 };
 
 BOOST_AUTO_TEST_SUITE(Chunks)
@@ -113,7 +113,7 @@
   Exclude expectedExclude;
   for (size_t retries = 0; retries < randomStrings.size(); ++retries) {
     auto data = make_shared<Data>(Name(name).appendVersion(version).append(randomStrings[retries]));
-    data->setFinalBlockId(name::Component::fromSegment(0));
+    data->setFinalBlock(name::Component::fromSegment(0));
     data = signData(data);
 
     face.receive(*data);
diff --git a/tests/chunks/discover-version-fixture.hpp b/tests/chunks/discover-version-fixture.hpp
index a7d8f0b..8d49537 100644
--- a/tests/chunks/discover-version-fixture.hpp
+++ b/tests/chunks/discover-version-fixture.hpp
@@ -1,8 +1,8 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2016,  Regents of the University of California,
- *                      Colorado State University,
- *                      University Pierre & Marie Curie, Sorbonne University.
+/*
+ * Copyright (c) 2016-2018, Regents of the University of California,
+ *                          Colorado State University,
+ *                          University Pierre & Marie Curie, Sorbonne University.
  *
  * This file is part of ndn-tools (Named Data Networking Essential Tools).
  * See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -50,9 +50,7 @@
   }
 
   virtual
-  ~DiscoverVersionFixture()
-  {
-  }
+  ~DiscoverVersionFixture() = default;
 
 protected:
   void
@@ -67,7 +65,7 @@
   makeDataWithVersion(uint64_t version) const
   {
     auto data = make_shared<Data>(Name(name).appendVersion(version).appendSegment(0));
-    data->setFinalBlockId(name::Component::fromSegment(0));
+    data->setFinalBlock(name::Component::fromSegment(0));
     return signData(data);
   }
 
diff --git a/tests/chunks/pipeline-interests-fixture.hpp b/tests/chunks/pipeline-interests-fixture.hpp
index f94360d..c9979fd 100644
--- a/tests/chunks/pipeline-interests-fixture.hpp
+++ b/tests/chunks/pipeline-interests-fixture.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2016-2017, Regents of the University of California,
+ * Copyright (c) 2016-2018, Regents of the University of California,
  *                          Colorado State University,
  *                          University Pierre & Marie Curie, Sorbonne University.
  *
@@ -55,7 +55,7 @@
   {
     auto data = make_shared<Data>(Name(name).appendVersion(0).appendSegment(segmentNo));
     if (setFinalBlockId)
-      data->setFinalBlockId(name::Component::fromSegment(nDataSegments - 1));
+      data->setFinalBlock(name::Component::fromSegment(nDataSegments - 1));
     return signData(data);
   }
 
diff --git a/tests/chunks/producer.t.cpp b/tests/chunks/producer.t.cpp
index 902c3fb..c508abc 100644
--- a/tests/chunks/producer.t.cpp
+++ b/tests/chunks/producer.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2016-2017,  Regents of the University of California,
+ * Copyright (c) 2016-2018,  Regents of the University of California,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University.
  *
@@ -114,8 +114,8 @@
   auto lastData = face.sentData.back();
   BOOST_REQUIRE_EQUAL(lastData.getName().size(), prefix.size() + 2);
   BOOST_CHECK_EQUAL(lastData.getName()[-1].toSegment(), 0);
-  BOOST_REQUIRE(!lastData.getFinalBlockId().empty());
-  BOOST_CHECK_EQUAL(lastData.getFinalBlockId().toSegment(), nSegments - 1);
+  BOOST_REQUIRE(lastData.getFinalBlock());
+  BOOST_CHECK_EQUAL(lastData.getFinalBlock()->toSegment(), nSegments - 1);
   BOOST_CHECK_EQUAL(lastData.getSignature().getKeyLocator().getName(), keyLocatorName);
 
   // segment request
@@ -130,8 +130,8 @@
   lastData = face.sentData.back();
   BOOST_REQUIRE_EQUAL(lastData.getName().size(), prefix.size() + 2);
   BOOST_CHECK_EQUAL(lastData.getName()[-1].toSegment(), requestSegmentNo);
-  BOOST_REQUIRE(!lastData.getFinalBlockId().empty());
-  BOOST_CHECK_EQUAL(lastData.getFinalBlockId().toSegment(), nSegments - 1);
+  BOOST_REQUIRE(lastData.getFinalBlock());
+  BOOST_CHECK_EQUAL(lastData.getFinalBlock()->toSegment(), nSegments - 1);
   BOOST_CHECK_EQUAL(lastData.getSignature().getKeyLocator().getName(), keyLocatorName);
 }
 
@@ -150,8 +150,8 @@
   BOOST_REQUIRE_EQUAL(lastData.getName().size(), prefix.size() + 1);
   BOOST_CHECK_EQUAL(lastData.getName()[-2].toVersion(), version);
   BOOST_CHECK_EQUAL(lastData.getName()[-1].toSegment(), 0);
-  BOOST_REQUIRE(!lastData.getFinalBlockId().empty());
-  BOOST_CHECK_EQUAL(lastData.getFinalBlockId().toSegment(), nSegments - 1);
+  BOOST_REQUIRE(lastData.getFinalBlock());
+  BOOST_CHECK_EQUAL(lastData.getFinalBlock()->toSegment(), nSegments - 1);
   BOOST_CHECK_EQUAL(lastData.getSignature().getKeyLocator().getName(), keyLocatorName);
 
   // segment request
@@ -166,8 +166,8 @@
   BOOST_REQUIRE_EQUAL(lastData.getName().size(), prefix.size() + 1);
   BOOST_CHECK_EQUAL(lastData.getName()[-2].toVersion(), version);
   BOOST_CHECK_EQUAL(lastData.getName()[-1].toSegment(), requestSegmentNo);
-  BOOST_REQUIRE(!lastData.getFinalBlockId().empty());
-  BOOST_CHECK_EQUAL(lastData.getFinalBlockId().toSegment(), nSegments - 1);
+  BOOST_REQUIRE(lastData.getFinalBlock());
+  BOOST_CHECK_EQUAL(lastData.getFinalBlock()->toSegment(), nSegments - 1);
   BOOST_CHECK_EQUAL(lastData.getSignature().getKeyLocator().getName(), keyLocatorName);
 }
 
@@ -185,8 +185,8 @@
   auto lastData = face.sentData.back();
   BOOST_REQUIRE_EQUAL(lastData.getName().size(), prefix.size() + 2);
   BOOST_CHECK_EQUAL(lastData.getName()[-1].toSegment(), 0);
-  BOOST_REQUIRE(!lastData.getFinalBlockId().empty());
-  BOOST_CHECK_EQUAL(lastData.getFinalBlockId().toSegment(), nSegments - 1);
+  BOOST_REQUIRE(lastData.getFinalBlock());
+  BOOST_CHECK_EQUAL(lastData.getFinalBlock()->toSegment(), nSegments - 1);
   BOOST_CHECK_EQUAL(lastData.getSignature().getKeyLocator().getName(), keyLocatorName);
 
   // segment request
