diff --git a/src/nlsr_test.cpp b/src/nlsr_test.cpp
new file mode 100644
index 0000000..ef19e63
--- /dev/null
+++ b/src/nlsr_test.cpp
@@ -0,0 +1,104 @@
+#include <ndn-cpp-dev/face.hpp>
+#include <ndn-cpp-dev/security/key-chain.hpp>
+#include <ndn-cpp-dev/util/scheduler.hpp>
+
+#include "nlsr.hpp"
+#include "nlsr_test.hpp"
+
+using namespace std;
+using namespace ndn;
+
+void 
+nlsrTest::schedlueAddingLsas(nlsr& pnlsr)
+{
+	// scheduling adding two name lsas, two Cor Lsas and three Adj LSAs
+
+	//Scheduling Adding LSAs for router altair
+	string router("/ndn/memphis.edu/cs/altair");
+	string name1("/ndn/memphis.edu/cs/altair/name1");
+	string name2("/ndn/memphis.edu/cs/altair/name2");
+	string name3("/ndn/memphis.edu/cs/broadcast");
+	Adjacent adj1("/ndn/memphis.edu/cs/pollux",7,17,1,0);
+	Adjacent adj2("/ndn/memphis.edu/cs/maia",15,27,1,0);
+	
+	pnlsr.getScheduler().scheduleEvent(ndn::time::seconds(30),
+							ndn::bind(&nlsrTest::secheduledAddNameLsa,pnlsr.getNlsrTesting(), 
+																									boost::ref(pnlsr)
+							,router,name1,name2,name3));
+	pnlsr.getScheduler().scheduleEvent(ndn::time::seconds(37),
+							ndn::bind(&nlsrTest::secheduledAddCorLsa,pnlsr.getNlsrTesting(), 
+																									boost::ref(pnlsr)
+							,router,123.098,1.875));
+	pnlsr.getScheduler().scheduleEvent(ndn::time::seconds(47),
+							ndn::bind(&nlsrTest::scheduledAddAdjacentLsa,pnlsr.getNlsrTesting(), 
+																									boost::ref(pnlsr)
+							,router,adj1,adj2));
+
+	//Scheduling Adding LSAs for router Maia
+	string routerMaia("/ndn/memphis.edu/cs/maia");
+	string maiaName1("/ndn/memphis.edu/maia/name1");
+	string maiaName2("/ndn/memphis.edu/maia/name2");
+	string maiaName3("/ndn/memphis.edu/cs/broadcast");
+	Adjacent maiaAdj1("/ndn/memphis.edu/cs/pollux",8,25,1,0);
+	Adjacent maiaAdj2("/ndn/memphis.edu/cs/altair",11,15,1,0);
+
+	pnlsr.getScheduler().scheduleEvent(ndn::time::seconds(55),
+							ndn::bind(&nlsrTest::secheduledAddNameLsa,pnlsr.getNlsrTesting(), 
+																									boost::ref(pnlsr)
+							,routerMaia,maiaName1,maiaName2,maiaName3));
+	pnlsr.getScheduler().scheduleEvent(ndn::time::seconds(65),
+							ndn::bind(&nlsrTest::secheduledAddCorLsa,pnlsr.getNlsrTesting(), 
+																									boost::ref(pnlsr)
+							,routerMaia,12.098,0.875));
+	pnlsr.getScheduler().scheduleEvent(ndn::time::seconds(75),
+							ndn::bind(&nlsrTest::scheduledAddAdjacentLsa,pnlsr.getNlsrTesting(), 
+																									boost::ref(pnlsr)
+							,routerMaia,maiaAdj1,maiaAdj2));
+
+	//sheduling Adding LSAs for Router itself
+	string routerPollux("/ndn/memphis.edu/cs/pollux");
+	Adjacent polluxAdj1("/ndn/memphis.edu/cs/maia",9,13,1,0);
+	Adjacent polluxAdj2("/ndn/memphis.edu/cs/altair",12,23,1,0);
+
+	pnlsr.getScheduler().scheduleEvent(ndn::time::seconds(90),
+							ndn::bind(&nlsrTest::scheduledAddAdjacentLsa,pnlsr.getNlsrTesting(), 
+																									boost::ref(pnlsr)
+							,routerPollux,polluxAdj1,polluxAdj2));
+	
+	
+}
+
+
+
+void 
+nlsrTest::secheduledAddNameLsa(nlsr& pnlsr, string router,
+																		 string name1, string name2, string name3)
+{
+	Npl npl;
+	npl.insertIntoNpl(name1);
+	npl.insertIntoNpl(name2);
+	npl.insertIntoNpl(name3);
+	NameLsa nameLsa(router,1,1,3600,npl);
+	pnlsr.getLsdb().installNameLsa(pnlsr, nameLsa);
+	
+}
+																		 
+void 
+nlsrTest::secheduledAddCorLsa(nlsr& pnlsr,string router, double r, double angle)
+{
+	CorLsa corLsa(router,3,1,3600,r,angle);
+	pnlsr.getLsdb().installCorLsa(pnlsr, corLsa);
+}
+
+void 
+nlsrTest::scheduledAddAdjacentLsa(nlsr& pnlsr, string router, 
+	                                                Adjacent adj1, Adjacent adj2)
+{
+	Adl adl;
+	adl.insert(adj1);
+	adl.insert(adj2);
+	AdjLsa adjLsa(router,2,1,3600,2,adl);
+	pnlsr.getLsdb().installAdjLsa(pnlsr, adjLsa);
+	
+}
+	                                                
