diff --git a/model/sync-app-data-publish.cc b/model/sync-app-data-publish.cc
index 77b9160..66ca1ae 100644
--- a/model/sync-app-data-publish.cc
+++ b/model/sync-app-data-publish.cc
@@ -31,7 +31,10 @@
 string
 AppDataPublish::getRecentData (const string &prefix, uint32_t session)
 {
-  return "";
+	if (m_recentData.find(make_pair(prefix, session)) != m_recentData.end())
+		return m_recentData[make_pair(prefix, session)];
+	else
+		return "";
 }
 
 uint32_t
@@ -69,6 +72,11 @@
 
   m_ccnxHandle->publishData (contentNameWithSeqno.str (), dataBuffer, freshness);
 
+  unordered_map<pair<string, uint32_t>, string>::iterator it = m_recentData.find(make_pair(name, session));
+	if (it != m_recentData.end()) 
+		m_recentData.erase(it);
+	m_recentData.insert(make_pair(make_pair(name, session), dataBuffer));
+
   return true;
 }
 
diff --git a/model/sync-app-data-publish.h b/model/sync-app-data-publish.h
index d00588a..d072189 100644
--- a/model/sync-app-data-publish.h
+++ b/model/sync-app-data-publish.h
@@ -26,6 +26,7 @@
 #include <boost/unordered_map.hpp>
 #include "sync-seq-no.h"
 #include "sync-ccnx-wrapper.h"
+#include <utility>
 
 namespace Sync {
 
@@ -82,7 +83,7 @@
 private:
   boost::unordered_map<std::string, Seq> m_sequenceLog;
   CcnxWrapperPtr m_ccnxHandle;
-  boost::unordered_map<std::string, std::string> m_recentData;
+  boost::unordered_map<std::pair<std::string, uint32_t>, std::string> m_recentData;
 };
 
 } // Sync
diff --git a/model/sync-interest-table.cc b/model/sync-interest-table.cc
index 767017c..5b1c3e0 100644
--- a/model/sync-interest-table.cc
+++ b/model/sync-interest-table.cc
@@ -45,7 +45,9 @@
 bool SyncInterestTable::insert(string interest)
 {
 	recursive_mutex::scoped_lock lock(m_mutex);
-	m_table.erase(m_table.find(interest));
+	unordered_map<string, time_t>::iterator it = m_table.find(interest);
+	if (it != m_table.end())
+		m_table.erase(it);
 	time_t currentTime = time(0);
 	m_table.insert(make_pair(interest, currentTime));
 }
diff --git a/test/test_data_fetch_and_publish.cc b/test/test_data_fetch_and_publish.cc
new file mode 100644
index 0000000..d31f8f6
--- /dev/null
+++ b/test/test_data_fetch_and_publish.cc
@@ -0,0 +1,111 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2012 University of California, Los Angeles
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
+ *         卞超轶 Chaoyi Bian <bcy@pku.edu.cn>
+ *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ */
+
+#include <boost/test/unit_test.hpp>
+#include <boost/test/output_test_stream.hpp> 
+#include <map>
+using boost::test_tools::output_test_stream;
+
+#include <boost/make_shared.hpp>
+
+#include "../model/sync-ccnx-wrapper.h"
+#include "../model/sync-app-data-fetch.h"
+#include "../model/sync-app-data-publish.h"
+
+using namespace Sync;
+using namespace std;
+using namespace boost;
+
+class TestStruct {
+public:
+	map<string, string> data;
+	void set(string str1, string str2) {
+		data.insert(make_pair(str1, str2));
+	}
+
+	void erase(string str1, string str2) {
+		data.erase(str1);
+	}
+
+	string toString(){
+		map<string, string>::iterator it = data.begin(); 
+		string str = "";
+		for (; it != data.end(); ++it){
+			str += "<";
+			str += it->first;
+			str += "|";
+			str += it->second;
+			str += ">";
+		}
+		return str;
+	}
+
+};
+
+BOOST_AUTO_TEST_CASE (AppDataPublishAndFetchTest)
+{
+	TestStruct foo;
+	TestStruct bar;
+	
+	string interest = "/april/fool";
+	string seq[5] = {"1", "2", "3", "4", "5"};
+	string str[5] = {"panda", "express", "tastes", "so", "good"};
+
+	for (int i = 0; i < 5; i++) {
+		foo.set(interest + "/" + seq[i], str[i]);
+	}
+
+	boost::function<void (string, string)> setFunc =
+	bind(&TestStruct::set, &bar, _1, _2);
+
+	shared_ptr<CcnxWrapper> handle(new CcnxWrapper());
+
+	AppDataFetch fetcher(handle, setFunc);
+	AppDataPublish publisher(handle);
+
+	for (int i = 1; i <= 5; i++) {
+		publisher.publishData(interest, 0, str[i - 1], 5);
+	}
+
+	BOOST_CHECK_EQUAL(publisher.getHighestSeq(interest, 0), 5);
+	BOOST_CHECK_EQUAL(publisher.getRecentData(interest, 0), str[4]);
+
+	fetcher.fetch(interest, 1, 5);
+	// give time for ccnd to react
+	sleep(1);
+	BOOST_CHECK_EQUAL(foo.toString(), bar.toString());
+
+
+	boost::function<void (string, string)> eraseFunc =
+	bind(&TestStruct::erase, &bar, _1, _2);
+	fetcher.setDataCallback(eraseFunc);
+
+	fetcher.fetch(interest, 1, 5);
+	// give time for ccnd to react
+	sleep(1);
+	TestStruct poo;
+
+	BOOST_CHECK_EQUAL(poo.toString(), bar.toString());
+
+}
+
+
