diff --git a/tests/route/test-name-prefix-table-entry.cpp b/tests/route/test-name-prefix-table-entry.cpp
new file mode 100644
index 0000000..478d4bd
--- /dev/null
+++ b/tests/route/test-name-prefix-table-entry.cpp
@@ -0,0 +1,96 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2019,  The University of Memphis,
+ *                           Regents of the University of California
+ *
+ * This file is part of NLSR (Named-data Link State Routing).
+ * See AUTHORS.md for complete list of NLSR authors and contributors.
+ *
+ * NLSR is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NLSR 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NLSR, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * \author Ashlesh Gawande <agawande@memphis.edu>
+ *
+ **/
+#include "route/name-prefix-table-entry.hpp"
+#include <boost/test/unit_test.hpp>
+
+namespace nlsr {
+
+namespace test {
+
+BOOST_AUTO_TEST_SUITE(TestNpte)
+
+BOOST_AUTO_TEST_CASE(NpteConstructorAndNamePrefix)
+{
+  NamePrefixTableEntry npte1("/ndn/memphis.edu/cs");
+
+  BOOST_CHECK_EQUAL(npte1.getNamePrefix(), "/ndn/memphis.edu/cs");
+}
+
+BOOST_AUTO_TEST_CASE(AddRoutingTableEntry)
+{
+  NamePrefixTableEntry npte1("/ndn/memphis/rtr1");
+  RoutingTablePoolEntry rtpe1("/ndn/memphis/rtr2", 0);
+  std::shared_ptr<RoutingTablePoolEntry> rtpePtr
+    = std::make_shared<RoutingTablePoolEntry>(rtpe1);
+
+  BOOST_CHECK_EQUAL(npte1.m_rteList.size(), 0);
+  npte1.addRoutingTableEntry(rtpePtr);
+  BOOST_CHECK_EQUAL(npte1.m_rteList.size(), 1);
+
+  std::list<std::shared_ptr<RoutingTablePoolEntry>>::iterator itr =
+    std::find(npte1.m_rteList.begin(),
+              npte1.m_rteList.end(),
+              rtpePtr);
+
+  BOOST_CHECK_EQUAL(rtpePtr, *itr);
+}
+
+BOOST_AUTO_TEST_CASE(RemoveRoutingTableEntry)
+{
+  NamePrefixTableEntry npte1("/ndn/memphis/rtr1");
+  RoutingTablePoolEntry rtpe1("/ndn/memphis/rtr2", 0);
+  std::shared_ptr<RoutingTablePoolEntry> rtpePtr
+    = std::make_shared<RoutingTablePoolEntry>(rtpe1);
+
+  npte1.addRoutingTableEntry(rtpePtr);
+  npte1.removeRoutingTableEntry(rtpePtr);
+
+  int count = 0;
+  for (auto&& rte : npte1.m_rteList) {
+    if (*rte == rtpe1) {
+      count++;
+    }
+  }
+
+  BOOST_CHECK_EQUAL(count, 0);
+}
+
+BOOST_AUTO_TEST_CASE(EqualsOperatorTwoObj)
+{
+  NamePrefixTableEntry npte1("/ndn/memphis/rtr1");
+  NamePrefixTableEntry npte2("/ndn/memphis/rtr1");
+
+  BOOST_CHECK_EQUAL(npte1, npte2);
+}
+
+BOOST_AUTO_TEST_CASE(EqualsOperatorOneObjOneName)
+{
+  NamePrefixTableEntry npte1("/ndn/memphis/rtr1");
+
+  BOOST_CHECK_EQUAL(npte1, "/ndn/memphis/rtr1");
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+
+} // namespace test
+} // namespace nlsr
