chunks+peek: stop using deprecated {get,set}FinalBlockId

Change-Id: I64ae1c33a6f83af34b3db3d5f48cee3f3e7b7cb1
Refs: #4526
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