diff --git a/test/test_app_socket.cc b/test/test_app_socket.cc
index 6a6e04a..d502822 100644
--- a/test/test_app_socket.cc
+++ b/test/test_app_socket.cc
@@ -40,6 +40,9 @@
 
 INIT_LOGGER ("Test.AppSocket");
 
+#define PRINT 
+//std::cout << "Line: " << __LINE__ << std::endl;
+
 class TestSocketApp {
 public:
   map<string, string> data;
@@ -51,9 +54,12 @@
 
   void fetchAll(const vector<MissingDataInfo> &v, SyncAppSocket *socket) {
     int n = v.size();
+
+    PRINT
+
     for (int i = 0; i < n; i++) {
-      SeqNo s = v[i].low;
-      for(++s; s <= v[i].high; ++s) {
+      for(SeqNo s = v[i].low; s <= v[i].high; ++s) {
+        PRINT
         socket->fetchString(v[i].prefix, s, bind(&TestSocketApp::set, this, _1, _2));
       }
     }
@@ -101,7 +107,7 @@
   string data0 = "Very funny Scotty, now beam down my clothes";
   _LOG_DEBUG ("s1 publish");
   s1.publishString (p1, 0, data0, 10); 
-  this_thread::sleep (posix_time::milliseconds (120));
+  this_thread::sleep (posix_time::milliseconds (1000));
 
   // from code logic, we won't be fetching our own data
   a1.set(p1 + "/0/0", data0);
diff --git a/test/test_ccnx_wrapper.cc b/test/test_ccnx_wrapper.cc
index 3db44ba..c10930c 100644
--- a/test/test_ccnx_wrapper.cc
+++ b/test/test_ccnx_wrapper.cc
@@ -44,6 +44,15 @@
     s_str1 = str1;
     s_str2 = str2;
   }
+  char *m_buf;
+  size_t m_len;
+
+  void rawSet(string str1, const char *buf, size_t len) {
+    std::cout << "In rawSet" << std::endl;
+    m_buf = (char  *)calloc(1, len);
+    memcpy(m_buf, buf, len);
+    s_str1 = str1;
+  }
 };
 
 BOOST_AUTO_TEST_CASE (CcnxWrapperTest)
@@ -57,6 +66,9 @@
   boost::function<void (string, string)> memberFunc =
     bind(&TestStruct::set, &foo, _1, _2);
 
+  boost::function<void (string, const char *, size_t)> rawFunc =
+    bind(&TestStruct::rawSet, &foo, _1, _2, _3);
+
   string prefix = "/ucla.edu";
   ha.setInterestFilter(prefix, globalFunc);
   this_thread::sleep (posix_time::milliseconds (10));
@@ -79,6 +91,14 @@
   this_thread::sleep (posix_time::milliseconds (5));
   BOOST_CHECK_EQUAL(foo.s_str1, name);
   BOOST_CHECK_EQUAL(foo.s_str2, data);
+
+  string rawDataName = "/ucla.edu/1";
+  int num[5] = {0, 1, 2, 3, 4};
+  ha.publishRawData(rawDataName, (const char *)num, sizeof(num), 30);
+  hb.sendInterest(rawDataName, rawFunc);
+  BOOST_CHECK_EQUAL(foo.s_str1, rawDataName);
+  
+  BOOST_CHECK(memcmp((char *)num, foo.m_buf, foo.m_len) == 0);
 }
 
 
diff --git a/test/test_scheduler.cc b/test/test_scheduler.cc
index 59687e4..0d67417 100644
--- a/test/test_scheduler.cc
+++ b/test/test_scheduler.cc
@@ -137,6 +137,10 @@
 {
 }
 
+void funcPass( const std::vector<MissingDataInfo> &v)
+{
+}
+
 void funcRemove( const std::string &/*prefix*/ )
 {
 }
@@ -144,7 +148,7 @@
 BOOST_AUTO_TEST_CASE (SyncLogicSchedulerTest)
 {  
   SyncLogic *logic = 0;
-  BOOST_CHECK_NO_THROW (logic = new SyncLogic ("/prefix", funcUpdate, funcRemove));
+  BOOST_CHECK_NO_THROW (logic = new SyncLogic ("/prefix", funcPass, funcRemove));
   this_thread::sleep (posix_time::milliseconds (100));
 
   Scheduler &scheduler = logic->getScheduler ();
