diff --git a/core/segment-publisher.hpp b/core/segment-publisher.hpp
index ccb3426..d79586d 100644
--- a/core/segment-publisher.hpp
+++ b/core/segment-publisher.hpp
@@ -1,12 +1,12 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014,  Regents of the University of California,
- *                      Arizona Board of Regents,
- *                      Colorado State University,
- *                      University Pierre & Marie Curie, Sorbonne University,
- *                      Washington University in St. Louis,
- *                      Beijing Institute of Technology,
- *                      The University of Memphis
+ * Copyright (c) 2014-2015,  Regents of the University of California,
+ *                           Arizona Board of Regents,
+ *                           Colorado State University,
+ *                           University Pierre & Marie Curie, Sorbonne University,
+ *                           Washington University in St. Louis,
+ *                           Beijing Institute of Technology,
+ *                           The University of Memphis.
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -40,10 +40,14 @@
 class SegmentPublisher : noncopyable
 {
 public:
-  SegmentPublisher(FaceBase& face, const Name& prefix, ndn::KeyChain& keyChain)
+  SegmentPublisher(FaceBase& face,
+                   const Name& prefix,
+                   ndn::KeyChain& keyChain,
+                   const time::milliseconds& freshnessPeriod = getDefaultFreshness())
     : m_face(face)
     , m_prefix(prefix)
     , m_keyChain(keyChain)
+    , m_freshnessPeriod(freshnessPeriod)
   {
   }
 
@@ -59,6 +63,12 @@
     return MAX_SEGMENT_SIZE;
   }
 
+  static constexpr time::milliseconds
+  getDefaultFreshness()
+  {
+    return time::milliseconds(1000);
+  }
+
   void
   publish()
   {
@@ -84,6 +94,7 @@
 
       shared_ptr<Data> data = make_shared<Data>(segmentName);
       data->setContent(segmentBegin, segmentEnd - segmentBegin);
+      data->setFreshnessPeriod(m_freshnessPeriod);
 
       segmentBegin = segmentEnd;
       if (segmentBegin >= end) {
@@ -113,6 +124,7 @@
   FaceBase& m_face;
   const Name m_prefix;
   ndn::KeyChain& m_keyChain;
+  const time::milliseconds m_freshnessPeriod;
 };
 
 } // namespace nfd
diff --git a/tests/core/segment-publisher.cpp b/tests/core/segment-publisher.cpp
index 565c314..7a9ee1d 100644
--- a/tests/core/segment-publisher.cpp
+++ b/tests/core/segment-publisher.cpp
@@ -1,12 +1,12 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014,  Regents of the University of California,
- *                      Arizona Board of Regents,
- *                      Colorado State University,
- *                      University Pierre & Marie Curie, Sorbonne University,
- *                      Washington University in St. Louis,
- *                      Beijing Institute of Technology,
- *                      The University of Memphis
+ * Copyright (c) 2014-2015,  Regents of the University of California,
+ *                           Arizona Board of Regents,
+ *                           Colorado State University,
+ *                           University Pierre & Marie Curie, Sorbonne University,
+ *                           Washington University in St. Louis,
+ *                           Beijing Institute of Technology,
+ *                           The University of Memphis.
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -40,8 +40,9 @@
 public:
   TestSegmentPublisher(ndn::util::DummyClientFace& face,
                        const Name& prefix,
-                       ndn::KeyChain& keyChain)
-    : SegmentPublisher(face, prefix, keyChain)
+                       ndn::KeyChain& keyChain,
+                       const time::milliseconds freshnessPeriod)
+    : SegmentPublisher(face, prefix, keyChain, freshnessPeriod)
     , m_totalPayloadLength(0)
   {
 
@@ -88,13 +89,17 @@
 public:
   SegmentPublisherFixture()
     : m_face(ndn::util::makeDummyClientFace())
-    , m_publisher(*m_face, "/localhost/nfd/SegmentPublisherFixture", m_keyChain)
+    , m_expectedFreshnessPeriod(time::milliseconds(111))
+    , m_publisher(*m_face, "/localhost/nfd/SegmentPublisherFixture",
+                  m_keyChain, m_expectedFreshnessPeriod)
   {
   }
 
   void
   validate(const Data& data)
   {
+    BOOST_CHECK_EQUAL(data.getFreshnessPeriod(), m_expectedFreshnessPeriod);
+
     Block payload = data.getContent();
     NFD_LOG_DEBUG("payload size (w/o Content TLV): " << payload.value_size());
 
@@ -132,6 +137,7 @@
 
 protected:
   shared_ptr<ndn::util::DummyClientFace> m_face;
+  const time::milliseconds m_expectedFreshnessPeriod;
   TestSegmentPublisher<N> m_publisher;
   ndn::EncodingBuffer m_buffer;
   ndn::KeyChain m_keyChain;
