diff --git a/src/torrent-file.cpp b/src/torrent-file.cpp
new file mode 100644
index 0000000..4302b53
--- /dev/null
+++ b/src/torrent-file.cpp
@@ -0,0 +1,241 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+* Copyright (c) 2016 Regents of the University of California.
+*
+* This file is part of the nTorrent codebase.
+*
+* nTorrent is free software: you can redistribute it and/or modify it under the
+* terms of the GNU Lesser General Public License as published by the Free Software
+* Foundation, either version 3 of the License, or (at your option) any later version.
+*
+* nTorrent is distributed in the hope that it will be useful, but WITHOUT ANY
+* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+*
+* You should have received copies of the GNU General Public License and GNU Lesser
+* General Public License along with nTorrent, e.g., in COPYING.md file. If not, see
+* <http://www.gnu.org/licenses/>.
+*
+* See AUTHORS for complete list of nTorrent authors and contributors.
+*/
+
+#include "torrent-file.hpp"
+
+#include <algorithm>
+
+#include <boost/range/adaptors.hpp>
+
+namespace ndn {
+
+namespace ntorrent {
+
+BOOST_CONCEPT_ASSERT((WireEncodable<TorrentFile>));
+BOOST_CONCEPT_ASSERT((WireDecodable<TorrentFile>));
+static_assert(std::is_base_of<Data::Error, TorrentFile::Error>::value,
+                "TorrentFile::Error should inherit from Data::Error");
+
+TorrentFile::TorrentFile(const Name& torrentFileName,
+                         const Name& torrentFilePtr,
+                         const Name& commonPrefix,
+                         const std::vector<ndn::Name>& catalog)
+  : Data(torrentFileName)
+  , m_commonPrefix(commonPrefix)
+  , m_torrentFilePtr(torrentFilePtr)
+  , m_catalog(catalog)
+{
+}
+
+TorrentFile::TorrentFile(const Name& torrentFileName,
+                         const Name& commonPrefix,
+                         const std::vector<ndn::Name>& catalog)
+  : Data(torrentFileName)
+  , m_commonPrefix(commonPrefix)
+  , m_catalog(catalog)
+{
+}
+
+TorrentFile::TorrentFile(const Block& block)
+{
+  this->wireDecode(block);
+}
+
+const Name&
+TorrentFile::getName() const
+{
+  return Data::getName();
+}
+
+const Name&
+TorrentFile::getCommonPrefix() const
+{
+  return m_commonPrefix;
+}
+
+void
+TorrentFile::createSuffixCatalog()
+{
+  for (auto i = m_catalog.begin() ; i != m_catalog.end(); ++i) {
+    m_suffixCatalog.push_back((*i).getSubName(m_commonPrefix.size()));
+  }
+}
+
+shared_ptr<Name>
+TorrentFile::getTorrentFilePtr() const
+{
+  if (this->hasTorrentFilePtr()) {
+    return make_shared<Name>(m_torrentFilePtr);
+  }
+  return nullptr;
+}
+
+void
+TorrentFile::constructLongNames()
+{
+  for (auto i = m_suffixCatalog.begin(); i != m_suffixCatalog.end(); ++i) {
+      Name commonPrefix = m_commonPrefix;
+      m_catalog.push_back(commonPrefix.append((*i)));
+  }
+}
+
+template<encoding::Tag TAG>
+size_t
+TorrentFile::encodeContent(EncodingImpl<TAG>& encoder) const
+{
+  // TorrentFileContent ::= CONTENT-TYPE TLV-LENGTH
+  //                      Suffix+
+  //                      CommonPrefix
+  //                      TorrentFilePtr?
+
+  // Suffix ::= NAME-TYPE TLV-LENGTH
+  //          Name
+
+  // CommonPrefix ::= NAME-TYPE TLV-LENGTH
+  //                Name
+
+  // TorrentFilePtr ::= NAME-TYPE TLV-LENGTH
+  //                  Name
+
+  size_t totalLength = 0;
+  for (const auto& name : m_suffixCatalog |  boost::adaptors::reversed) {
+    size_t fileManifestSuffixLength = 0;
+    fileManifestSuffixLength += name.wireEncode(encoder);
+    totalLength += fileManifestSuffixLength;
+  }
+  totalLength += m_commonPrefix.wireEncode(encoder);
+  if (!m_torrentFilePtr.empty()) {
+    size_t torrentFilePtrLength = 0;
+    torrentFilePtrLength += m_torrentFilePtr.wireEncode(encoder);
+    totalLength += torrentFilePtrLength;
+  }
+
+  totalLength += encoder.prependVarNumber(totalLength);
+  totalLength += encoder.prependVarNumber(tlv::Content);
+  return totalLength;
+}
+
+bool
+TorrentFile::erase(const Name& name)
+{
+  auto found = std::find(m_catalog.begin(), m_catalog.end(), name);
+  if (found != m_catalog.end()) {
+    m_catalog.erase(found);
+    return true;
+  }
+  return false;
+}
+
+void
+TorrentFile::encodeContent()
+{
+  onChanged();
+
+  EncodingEstimator estimator;
+  size_t estimatedSize = encodeContent(estimator);
+
+  EncodingBuffer buffer(estimatedSize, 0);
+  encodeContent(buffer);
+
+  setContentType(tlv::ContentType_Blob);
+  setContent(buffer.block());
+}
+
+void
+TorrentFile::decodeContent()
+{
+  // TorrentFileContent ::= CONTENT-TYPE TLV-LENGTH
+  //                      Suffix+
+  //                      CommonPrefix
+  //                      TorrentFilePtr?
+
+  // Suffix ::= NAME-TYPE TLV-LENGTH
+  //          Name
+
+  // CommonPrefix ::= NAME-TYPE TLV-LENGTH
+  //                Name
+
+  // TorrentFilePtr ::= NAME-TYPE TLV-LENGTH
+  //                  Name
+
+  if (getContentType() != tlv::ContentType_Blob) {
+      BOOST_THROW_EXCEPTION(Error("Expected Content Type Blob"));
+  }
+
+  const Block& content = Data::getContent();
+  content.parse();
+
+  // Check whether there is a TorrentFilePtr
+  auto element = content.elements_begin();
+  if (content.elements_end() == element) {
+    BOOST_THROW_EXCEPTION(Error(".Torrent-file with empty content"));
+  }
+  element->parse();
+  Name name(*element);
+  if (name.empty())
+    BOOST_THROW_EXCEPTION(Error("Empty name included in the .torrent-file"));
+
+  if (name.get(name.size() - 3) == name::Component(".torrent-file")) {
+    m_torrentFilePtr = name;
+    ++element;
+    m_commonPrefix = Name(*element);
+    if (m_commonPrefix.empty()) {
+      BOOST_THROW_EXCEPTION(Error("Common prefix cannot be empty"));
+    }
+  }
+  else {
+    m_commonPrefix = name;
+  }
+  element++;
+  for (; element != content.elements_end(); ++element) {
+    element->parse();
+    Name fileManifestSuffix(*element);
+    if (fileManifestSuffix.empty())
+      BOOST_THROW_EXCEPTION(Error("Empty manifest file name included in the .torrent-file"));
+    this->insertToSuffixCatalog(fileManifestSuffix);
+  }
+  if (m_suffixCatalog.size() == 0) {
+    BOOST_THROW_EXCEPTION(Error(".Torrent-file with empty catalog of file manifest names"));
+  }
+}
+
+void
+TorrentFile::wireDecode(const Block& wire)
+{
+  m_catalog.clear();
+  m_suffixCatalog.clear();
+  Data::wireDecode(wire);
+  this->decodeContent();
+  this->constructLongNames();
+}
+
+const Block&
+TorrentFile::wireEncode()
+{
+  this->createSuffixCatalog();
+  this->encodeContent();
+  m_suffixCatalog.clear();
+  return Data::wireEncode();
+}
+
+} // namespace ntorrent
+
+} // namespace ndn
diff --git a/src/torrent-file.hpp b/src/torrent-file.hpp
new file mode 100644
index 0000000..89d3173
--- /dev/null
+++ b/src/torrent-file.hpp
@@ -0,0 +1,226 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+* Copyright (c) 2016 Regents of the University of California.
+*
+* This file is part of the nTorrent codebase.
+*
+* nTorrent is free software: you can redistribute it and/or modify it under the
+* terms of the GNU Lesser General Public License as published by the Free Software
+* Foundation, either version 3 of the License, or (at your option) any later version.
+*
+* nTorrent is distributed in the hope that it will be useful, but WITHOUT ANY
+* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+*
+* You should have received copies of the GNU General Public License and GNU Lesser
+* General Public License along with nTorrent, e.g., in COPYING.md file. If not, see
+* <http://www.gnu.org/licenses/>.
+*
+* See AUTHORS for complete list of nTorrent authors and contributors.
+*/
+
+#ifndef TORRENT_FILE_HPP
+#define TORRENT_FILE_HPP
+
+#include <ndn-cxx/name.hpp>
+#include <ndn-cxx/encoding/block.hpp>
+#include <ndn-cxx/data.hpp>
+
+#include <memory>
+
+namespace ndn {
+
+namespace ntorrent {
+
+class TorrentFile : public Data {
+public:
+  class Error : public Data::Error
+  {
+  public:
+    explicit
+    Error(const std::string& what)
+      : Data::Error(what)
+    {
+    }
+  };
+
+  /**
+   * @brief Create a new empty .TorrentFile.
+   */
+  TorrentFile() = default;
+
+  /**
+   * @brief Create a new .TorrentFile.
+   * @param torrentFileName The name of the .torrent-file
+   * @param torrentFilePtr A pointer (name) to the next segment of the .torrent-file
+   * @param commonPrefix The common name prefix of the manifest file names included in the catalog
+   * @param catalog The catalog containing the name of each file manifest
+   */
+  TorrentFile(const Name& torrentFileName,
+              const Name& torrentFilePtr,
+              const Name& commonPrefix,
+              const std::vector<ndn::Name>& catalog);
+
+  /**
+   * @brief Create a new .TorrentFile.
+   * @param torrentFileName The name of the .torrent-file
+   * @param commonPrefix The common name prefix of the manifest file names included in the catalog
+   * @param catalog The catalog containing the name of each file manifest
+   */
+  TorrentFile(const Name& torrentFileName,
+              const Name& commonPrefix,
+              const std::vector<ndn::Name>& catalog);
+
+  /**
+   * @brief Create a new .TorrentFile
+   * @param block The block format of the .torrent-file
+   */
+  explicit
+  TorrentFile(const Block& block);
+
+  /**
+   * @brief Get the name of the .TorrentFile
+   */
+  const Name&
+  getName() const;
+
+  /**
+   * @brief Get the common prefix of the file manifest names of this .torrent-file
+   */
+  const Name&
+  getCommonPrefix() const;
+
+  /**
+   * @brief Get a shared pointer to the name of the next segment of the .torrent-file.
+   *
+   * If there is no next segment, it returns a nullptr
+   */
+  shared_ptr<Name>
+  getTorrentFilePtr() const;
+
+  /**
+   * @brief Get the catalog of names of the file manifests
+   */
+  const std::vector<Name>&
+  getCatalog() const;
+
+  /**
+   * @brief Decode from wire format
+   */
+  void
+  wireDecode(const Block& wire);
+
+  /**
+   * @brief Encode from wire format
+   */
+  const Block&
+  wireEncode();
+
+  /**
+   * @brief Insert a name to the catalog of file manifest names
+   */
+  void
+  insert(const Name& name);
+
+  /**
+   * @brief Erase a name from the catalog of file manifest names
+   */
+  bool
+  erase(const Name& name);
+
+  /**
+   * @brief Get the size of the catalog of file manifest names
+   */
+  size_t
+  catalogSize() const;
+
+protected:
+  /**
+   * @brief prepend .torrent file as a Content block to the encoder
+   */
+  template<encoding::Tag TAG>
+  size_t
+  encodeContent(EncodingImpl<TAG>& encoder) const;
+
+  void
+  encodeContent();
+
+  void
+  decodeContent();
+
+private:
+  /**
+   * @brief Check whether the .torrent-file has a pointer to the next segment
+   */
+  bool
+  hasTorrentFilePtr() const;
+
+  /**
+   * @brief Create a catalog of suffixes for the names of the file manifests
+   *
+   * To optimize encoding and decoding, we encode the name of the file manifests
+   * as suffixes along with their common prefix.
+   *
+   */
+  void
+  createSuffixCatalog();
+
+  /**
+   * @brief Construct the catalog of long names from a catalog of suffixes for the file
+   *        manifests' name
+   *
+   * After decoding a .torrent-file from its wire format, we construct the catalog of
+   * long names from the decoded common prefix and suffixes
+   *
+   */
+  void
+  constructLongNames();
+
+  /**
+   * @brief Insert a suffix to the suffix catalog
+   */
+  void
+  insertToSuffixCatalog(const PartialName& suffix);
+
+private:
+  Name m_commonPrefix;
+  Name m_torrentFilePtr;
+  std::vector<ndn::Name> m_suffixCatalog;
+  std::vector<ndn::Name> m_catalog;
+};
+
+inline bool
+TorrentFile::hasTorrentFilePtr() const
+{
+  return !m_torrentFilePtr.empty();
+}
+
+inline const std::vector<Name>&
+TorrentFile::getCatalog() const
+{
+  return m_catalog;
+}
+
+inline size_t
+TorrentFile::catalogSize() const
+{
+  return m_catalog.size();
+}
+
+inline void
+TorrentFile::insert(const Name& name)
+{
+  m_catalog.push_back(name);
+}
+
+inline void
+TorrentFile::insertToSuffixCatalog(const PartialName& suffix)
+{
+  m_suffixCatalog.push_back(suffix);
+}
+
+} // namespace ntorrent
+
+} // namespace ndn
+
+#endif // TORRENT_FILE_HPP
diff --git a/tests/unit-tests/dummy.t.cpp b/tests/unit-tests/dummy.t.cpp
index de6d256..b58cb15 100644
--- a/tests/unit-tests/dummy.t.cpp
+++ b/tests/unit-tests/dummy.t.cpp
@@ -21,7 +21,10 @@
 
 #include "boost-test.hpp"
 
-namespace nTorrent {
+namespace ndn {
+
+namespace ntorrent {
+
 namespace tests {
 
 BOOST_AUTO_TEST_SUITE(DummyTest)
@@ -34,4 +37,7 @@
 BOOST_AUTO_TEST_SUITE_END()
 
 } // namespace tests
-} // namespace nTorrent
+
+} // namespace ntorrent
+
+} // namespace ndn
diff --git a/tests/unit-tests/torrent-file.t.cpp b/tests/unit-tests/torrent-file.t.cpp
new file mode 100644
index 0000000..90b9b6d
--- /dev/null
+++ b/tests/unit-tests/torrent-file.t.cpp
@@ -0,0 +1,290 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+* Copyright (c) 2016 Regents of the University of California.
+*
+* This file is part of the nTorrent codebase.
+*
+* nTorrent is free software: you can redistribute it and/or modify it under the
+* terms of the GNU Lesser General Public License as published by the Free Software
+* Foundation, either version 3 of the License, or (at your option) any later version.
+*
+* nTorrent is distributed in the hope that it will be useful, but WITHOUT ANY
+* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+*
+* You should have received copies of the GNU General Public License and GNU Lesser
+* General Public License along with nTorrent, e.g., in COPYING.md file. If not, see
+* <http://www.gnu.org/licenses/>.
+*
+* See AUTHORS for complete list of nTorrent authors and contributors.
+*/
+
+#include "boost-test.hpp"
+
+#include "torrent-file.hpp"
+
+#include <ndn-cxx/data.hpp>
+#include <ndn-cxx/signature.hpp>
+#include <ndn-cxx/security/key-chain.hpp>
+
+namespace ndn {
+
+namespace ntorrent {
+
+namespace tests {
+
+
+const static uint8_t TorrentFileTest[] = {
+  0x6, 0xfd,
+  0x1, 0xe4,
+     0x7, 0x25,
+        0x8, 0x8,
+           0x4e, 0x54, 0x4f, 0x52, 0x52, 0x45, 0x4e, 0x54,
+        0x8, 0xa,
+           0x6c, 0x69, 0x6e, 0x75, 0x78, 0x31, 0x35, 0x2e, 0x30, 0x31,
+        0x8, 0xd,
+          0x2e, 0x74, 0x6f, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x2d, 0x66, 0x69, 0x6c, 0x65,
+     0x14, 0x0,
+     0x15, 0x77,
+        0x7, 0x37,
+           0x8, 0x8,
+              0x4e, 0x54, 0x4f, 0x52, 0x52, 0x45, 0x4e, 0x54,
+           0x8, 0xa,
+              0x6c, 0x69, 0x6e, 0x75, 0x78, 0x31, 0x35, 0x2e, 0x30, 0x31,
+           0x8, 0xd,
+              0x2e, 0x74, 0x6f, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x2d, 0x66, 0x69, 0x6c, 0x65,
+           0x8, 0x8,
+              0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x32,
+           0x8, 0x6,
+              0x41, 0x45, 0x33, 0x32, 0x31, 0x43,
+        0x7, 0x16,
+           0x8, 0x8,
+              0x4e, 0x54, 0x4f, 0x52, 0x52, 0x45, 0x4e, 0x54,
+           0x8, 0xa,
+              0x6c, 0x69, 0x6e, 0x75, 0x78, 0x31, 0x35, 0x2e, 0x30, 0x31,
+        0x7, 0x11,
+           0x8, 0x5,
+              0x66, 0x69, 0x6c, 0x65, 0x30,
+           0x8, 0x8,
+              0x31, 0x41, 0x32, 0x42, 0x33, 0x43, 0x34, 0x44,
+        0x7, 0x11,
+           0x8, 0x5,
+              0x66, 0x69, 0x6c, 0x65, 0x31,
+           0x8, 0x8,
+              0x32, 0x41, 0x33, 0x42, 0x34, 0x43, 0x35, 0x45,
+     0x16, 0x3c,
+        0x1b, 0x1,
+           0x1,
+        0x1c, 0x37,
+            0x7, 0x35,
+               0x8, 0xc,
+                  0x74, 0x6d, 0x70, 0x2d, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,
+               0x8, 0x4,
+                  0x3d, 0xa8, 0x2c, 0x19,
+               0x8, 0x3,
+                  0x4b, 0x45, 0x59,
+               0x8, 0x11,
+                  0x6b, 0x73, 0x6b, 0x2d, 0x31, 0x34, 0x35, 0x34, 0x39, 0x37, 0x33, 0x38, 0x37, 0x36, 0x31, 0x37, 0x31,
+               0x8, 0x7,
+                  0x49, 0x44, 0x2d, 0x43, 0x45, 0x52, 0x54,
+      0x17, 0xfd,
+         0x1, 0x0, 0x37, 0x61, 0xc9, 0x3b, 0x43, 0xe8, 0xa3, 0xcd, 0xf0, 0xb1,
+         0x14, 0x78, 0x50, 0x6, 0x3c, 0x8a, 0x7, 0x4d, 0xe4, 0xa8, 0xbe, 0xc1,
+         0x8c, 0x40, 0xaf, 0xaa, 0x21, 0x9f, 0x58, 0xed, 0xc0, 0x99, 0x92, 0xb8,
+         0xb2, 0xb8, 0xac, 0x4, 0x3f, 0xa2, 0x25, 0xd7, 0x68, 0xa9, 0x5e, 0xc6,
+         0xf5, 0x20, 0x69, 0xe3, 0xf, 0x37, 0xfc, 0xc7, 0x3f, 0x72, 0x8, 0x74,
+         0x8, 0x5e, 0x10, 0x4d, 0xef, 0xa3, 0x58, 0x59, 0xb6, 0x90, 0x53, 0x1c,
+         0x4b, 0x22, 0xb0, 0x3e, 0x87, 0x95, 0x5b, 0xa6, 0xd, 0x84, 0x1f, 0x60,
+         0xda, 0xe, 0x22, 0x29, 0xda, 0x38, 0x1c, 0x90, 0x4a, 0x2a, 0x60, 0xe4,
+         0xc9, 0x36, 0xb6, 0x4f, 0x9a, 0x17, 0x69, 0x99, 0xf4, 0x84, 0xa5, 0x5b,
+         0xec, 0x70, 0x34, 0x1b, 0xbc, 0x14, 0xee, 0xb1, 0xa7, 0x42, 0xb7, 0xd8,
+         0x9, 0x45, 0xe0, 0x2d, 0x4, 0x8f, 0x66, 0xdb, 0x43, 0x68, 0x8e, 0x53,
+         0x94, 0x1e, 0xcd, 0xaa, 0x47, 0x80, 0xaf, 0xd0, 0x1d, 0x6b, 0x21, 0x1,
+         0x5a, 0x36, 0x97, 0x87, 0x44, 0xc9, 0x31, 0x57, 0xcd, 0x5d, 0xc1, 0xa5,
+         0xfc, 0x35, 0xb1, 0x60, 0x29, 0xc6, 0x82, 0xe9, 0x52, 0x33, 0xac, 0xf9,
+         0xb, 0xca, 0xbe, 0x62, 0x8b, 0x88, 0x49, 0x9a, 0x6f, 0xbd, 0xed, 0x1e,
+         0x8c, 0x4c, 0x63, 0xfb, 0xd9, 0x20, 0xcb, 0x1c, 0x66, 0xa4, 0xb9, 0xc,
+         0x21, 0x61, 0xc4, 0x56, 0x4c, 0xa8, 0x58, 0x4b, 0x7a, 0x81, 0x2c, 0xf0,
+         0x2f, 0xce, 0x7d, 0x1d, 0xbf, 0x16, 0xc, 0x74, 0x35, 0x83, 0x8a, 0x22,
+         0xc4, 0x2, 0xeb, 0x42, 0xd3, 0x76, 0x36, 0x8a, 0x71, 0x7b, 0x6b, 0xb8,
+         0x3f, 0x7a, 0xb8, 0xc6, 0xf6, 0xca, 0xed, 0x74, 0xdb, 0xa4, 0x42, 0x65,
+         0xa5, 0x96, 0xde, 0xd9, 0xfa, 0x45, 0x25, 0x9a, 0xc1, 0xde, 0xd1, 0xf6,
+         0x7a, 0xaf, 0xa3, 0xfd, 0x4e, 0xa9
+};
+
+BOOST_AUTO_TEST_SUITE(TestTorrentFile)
+
+BOOST_AUTO_TEST_CASE(CheckGettersSetters)
+{
+
+  TorrentFile file("/NTORRENT/linux15.01/.torrent-file",
+                   "/NTORRENT/linux15.01/.torrent-file/segment2/AE321C",
+                   "/NTORRENT/linux15.01",
+                   {"/NTORRENT/linux15.01/file0/1A2B3C4D",
+                   "/NTORRENT/linux15.01/file1/2A3B4C5E"});
+
+  BOOST_CHECK_EQUAL(file.getName(), "/NTORRENT/linux15.01/.torrent-file");
+  BOOST_CHECK_EQUAL(file.getCatalog().size(), 2);
+  BOOST_CHECK_EQUAL(*(file.getTorrentFilePtr()), "/NTORRENT/linux15.01/.torrent-file/segment2/AE321C");
+  BOOST_CHECK_EQUAL(file.getCatalog()[0], "/NTORRENT/linux15.01/file0/1A2B3C4D");
+  BOOST_CHECK_EQUAL(file.getCatalog()[1], "/NTORRENT/linux15.01/file1/2A3B4C5E");
+
+  TorrentFile file2("/NTORRENT/linux15.01/.torrent-file",
+                    "/NTORRENT/linux15.01",
+                    {"/NTORRENT/linux15.01/file0/1A2B3C4D"});
+
+  BOOST_CHECK_EQUAL(file2.getName(), "/NTORRENT/linux15.01/.torrent-file");
+  BOOST_CHECK(!file2.getTorrentFilePtr());
+  BOOST_CHECK_EQUAL(file2.getCatalog().size(), 1);
+}
+
+BOOST_AUTO_TEST_CASE(CheckEncodeDecode)
+{
+  TorrentFile file("/NTORRENT/linux15.01/.torrent-file",
+                   "/NTORRENT/linux15.01/.torrent-file/segment2/AE321C",
+                   "/NTORRENT/linux15.01",
+                   {"/NTORRENT/linux15.01/file0/1A2B3C4D",
+                   "/NTORRENT/linux15.01/file1/2A3B4C5E"});
+
+  KeyChain keyChain;
+  keyChain.sign(file);
+
+  Block wire = file.wireEncode();
+
+  TorrentFile file2;
+  file2.wireDecode(wire);
+
+  BOOST_CHECK_EQUAL(file2.getName(), "/NTORRENT/linux15.01/.torrent-file");
+  BOOST_CHECK_EQUAL(*(file2.getTorrentFilePtr()), "/NTORRENT/linux15.01/.torrent-file/segment2/AE321C");
+  BOOST_CHECK_EQUAL(file2.getCatalog().size(), 2);
+  BOOST_CHECK_EQUAL(file2.getCatalog()[0], "/NTORRENT/linux15.01/file0/1A2B3C4D");
+  BOOST_CHECK_EQUAL(file2.getCatalog()[1], "/NTORRENT/linux15.01/file1/2A3B4C5E");
+  BOOST_CHECK_EQUAL(file2.getCommonPrefix(), "/NTORRENT/linux15.01");
+}
+
+BOOST_AUTO_TEST_CASE(CheckEncodeDecodeNoTorrentFilePtr)
+{
+  TorrentFile file("/NTORRENT/linux15.01/.torrent-file",
+                   "/NTORRENT/linux15.01",
+                   {"/NTORRENT/linux15.01/file0/1A2B3C4D",
+                   "/NTORRENT/linux15.01/file1/2A3B4C5E"});
+
+  KeyChain keyChain;
+  keyChain.sign(file);
+
+  Block wire = file.wireEncode();
+
+  TorrentFile file2;
+  file2.wireDecode(wire);
+
+  BOOST_CHECK_EQUAL(file2.getName(), "/NTORRENT/linux15.01/.torrent-file");
+  BOOST_CHECK(!file2.getTorrentFilePtr());
+  BOOST_CHECK_EQUAL(file2.getCatalog().size(), 2);
+  BOOST_CHECK_EQUAL(file2.getCatalog()[0], "/NTORRENT/linux15.01/file0/1A2B3C4D");
+  BOOST_CHECK_EQUAL(file2.getCatalog()[1], "/NTORRENT/linux15.01/file1/2A3B4C5E");
+}
+
+BOOST_AUTO_TEST_CASE(CheckEncodeDecodeEmptyTorrentFile)
+{
+  TorrentFile file("/NTORRENT/linux15.01/.torrent-file",
+                  "",
+                  {});
+
+  KeyChain keyChain;
+  keyChain.sign(file);
+
+  Block wire = file.wireEncode();
+
+  TorrentFile file2;
+
+  BOOST_REQUIRE_THROW(file2.wireDecode(wire), TorrentFile::Error);
+}
+
+
+BOOST_AUTO_TEST_CASE(CheckEncodeDecodeEmptyCatalog)
+{
+
+  TorrentFile file("/NTORRENT/linux15.01/.torrent-file",
+                  "/NTORRENT/linux15.01/.torrent-file/segment2/AE321C",
+                  "/NTORRENT/linux15.01",
+                  {});
+
+  KeyChain keyChain;
+  keyChain.sign(file);
+
+  Block wire = file.wireEncode();
+
+  TorrentFile file2;
+
+  BOOST_REQUIRE_THROW(file2.wireDecode(wire), TorrentFile::Error);
+}
+
+BOOST_AUTO_TEST_CASE(DecodeFromWire)
+{
+
+  Block TorrentFileBlock(TorrentFileTest, sizeof(TorrentFileTest));
+  TorrentFile file(TorrentFileBlock);
+
+  BOOST_CHECK_EQUAL(file.getName(), "/NTORRENT/linux15.01/.torrent-file");
+  BOOST_CHECK_EQUAL(*(file.getTorrentFilePtr()), "/NTORRENT/linux15.01/.torrent-file/segment2/AE321C");
+  BOOST_CHECK_EQUAL(file.getCatalog().size(), 2);
+  BOOST_CHECK_EQUAL(file.getCatalog()[0], "/NTORRENT/linux15.01/file0/1A2B3C4D");
+  BOOST_CHECK_EQUAL(file.getCatalog()[1], "/NTORRENT/linux15.01/file1/2A3B4C5E");
+  BOOST_CHECK_EQUAL(file.getCommonPrefix(), "/NTORRENT/linux15.01");
+}
+
+BOOST_AUTO_TEST_CASE(TestInsertErase)
+{
+  TorrentFile file("/NTORRENT/linux15.01/.torrent-file",
+                   "/NTORRENT/linux15.01/.torrent-file/segment2/AE321C",
+                   "/NTORRENT/linux15.01",
+                   {"/NTORRENT/linux15.01/file0/1A2B3C4D",
+                   "/NTORRENT/linux15.01/file1/2A3B4C5E"});
+
+  file.erase("/NTORRENT/linux15.01/file0/1A2B3C4D");
+  BOOST_CHECK_EQUAL(file.getCatalog()[0], "/NTORRENT/linux15.01/file1/2A3B4C5E");
+
+  file.erase("/NTORRENT/linux15.01/file1/2A3B4C5E");
+  BOOST_CHECK_EQUAL(file.getCatalog().size(), 0);
+
+  file.insert("/NTORRENT/linux15.01/file3/AB34C5KA");
+  BOOST_CHECK_EQUAL(file.getCatalog().size(), 1);
+  BOOST_CHECK_EQUAL(file.getCatalog()[0], "/NTORRENT/linux15.01/file3/AB34C5KA");
+}
+
+BOOST_AUTO_TEST_CASE(TestInsertAndEncodeTwice)
+{
+  TorrentFile file("/NTORRENT/linux15.01/.torrent-file",
+                   "/NTORRENT/linux15.01/.torrent-file/segment2/AE321C",
+                   "/NTORRENT/linux15.01",
+                   {"/NTORRENT/linux15.01/file0/1A2B3C4D",
+                   "/NTORRENT/linux15.01/file1/2A3B4C5E"});
+
+  KeyChain keyChain;
+  keyChain.sign(file);
+  Block wire = file.wireEncode();
+
+  TorrentFile file2;
+  file2.wireDecode(wire);
+  BOOST_CHECK_EQUAL(file2.getCatalog().size(), 2);
+
+  file.insert("/NTORRENT/linux15.01/file3/AB34C5KA");
+  file.insert("/NTORRENT/linux15.01/file4/CB24C3GB");
+  Block wire2 = file.wireEncode();
+
+  file2.wireDecode(wire2);
+  BOOST_CHECK_EQUAL(file2.getCatalog().size(), 4);
+
+  BOOST_CHECK_EQUAL(file2.getCatalog()[0], "/NTORRENT/linux15.01/file0/1A2B3C4D");
+  BOOST_CHECK_EQUAL(file2.getCatalog()[1], "/NTORRENT/linux15.01/file1/2A3B4C5E");
+  BOOST_CHECK_EQUAL(file2.getCatalog()[2], "/NTORRENT/linux15.01/file3/AB34C5KA");
+  BOOST_CHECK_EQUAL(file2.getCatalog()[3], "/NTORRENT/linux15.01/file4/CB24C3GB");
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+
+} // namespace tests
+
+} // namespace ntorrent
+
+} // namespace ndn
