diff --git a/tests/test-encode-decode-ContentObject.cpp b/tests/test-encode-decode-data.cpp
similarity index 74%
rename from tests/test-encode-decode-ContentObject.cpp
rename to tests/test-encode-decode-data.cpp
index 0ed1c99..bc4a324 100644
--- a/tests/test-encode-decode-ContentObject.cpp
+++ b/tests/test-encode-decode-data.cpp
@@ -11,7 +11,7 @@
 #include <boost/date_time/posix_time/time_serialize.hpp>
 #include <boost/date_time/gregorian/gregorian.hpp>
 #endif
-#include <ndn-cpp/ContentObject.hpp>
+#include <ndn-cpp/data.hpp>
 
 using namespace std;
 using namespace ndn;
@@ -20,8 +20,8 @@
 using namespace boost::gregorian;
 #endif
 
-unsigned char ContentObject1[] = {
-0x04, 0x82, // ContentObject
+unsigned char Data1[] = {
+0x04, 0x82, // NDN Data
   0x02, 0xaa, // Signature
     0x03, 0xb2, // SignatureBits
       0x08, 0x85, 0x20, 0xea, 0xb5, 0xb0, 0x63, 0xda, 0x94, 0xe9, 0x68, 0x7a,
@@ -73,24 +73,24 @@
 int main(int argc, char** argv)
 {
   try {
-    ContentObject contentObject;
-    contentObject.decode(ContentObject1, sizeof(ContentObject1));
-    cout << "ContentObject name " << contentObject.getName().to_uri() << endl;
+    Data data;
+    data.decode(Data1, sizeof(Data1));
+    cout << "Data name " << data.getName().to_uri() << endl;
 #if 0
-    ptime timestamp = UNIX_EPOCH_TIME + milliseconds(contentObject.getSignedInfo().getTimestampMilliseconds());
-    cout << "ContentObject timestamp " << timestamp.date().year() << "/" << timestamp.date().month() << "/" << timestamp.date().day() 
+    ptime timestamp = UNIX_EPOCH_TIME + milliseconds(data.getSignedInfo().getTimestampMilliseconds());
+    cout << "Data timestamp " << timestamp.date().year() << "/" << timestamp.date().month() << "/" << timestamp.date().day() 
          << " " << timestamp.time_of_day().hours() << ":" << timestamp.time_of_day().minutes() << ":" << timestamp.time_of_day().seconds()  << endl;
 #endif
     
-    ptr_lib::shared_ptr<vector<unsigned char> > encoding = contentObject.encode();
-    cout << "ContentObject encoding length " << encoding->size() << " vs. sizeof(ContentObject1) " << sizeof(ContentObject1) << endl;
+    ptr_lib::shared_ptr<vector<unsigned char> > encoding = data.encode();
+    cout << "Data encoding length " << encoding->size() << " vs. sizeof(Data1) " << sizeof(Data1) << endl;
     
-    ContentObject reDecodedContentObject;
-    reDecodedContentObject.decode(*encoding);
-    cout << "Re-decoded ContentObject name " << reDecodedContentObject.getName().to_uri() << endl;
+    Data reDecodedData;
+    reDecodedData.decode(*encoding);
+    cout << "Re-decoded Data name " << reDecodedData.getName().to_uri() << endl;
 #if 0
-    timestamp = UNIX_EPOCH_TIME + milliseconds(reDecodedContentObject.getSignedInfo().getTimestampMilliseconds());
-    cout << "Re-decoded ContentObject timestamp " << timestamp.date().year() << "/" << timestamp.date().month() << "/" << timestamp.date().day() << endl;
+    timestamp = UNIX_EPOCH_TIME + milliseconds(reDecodedData.getSignedInfo().getTimestampMilliseconds());
+    cout << "Re-decoded Data timestamp " << timestamp.date().year() << "/" << timestamp.date().month() << "/" << timestamp.date().day() << endl;
 #endif
   } catch (exception &e) {
     cout << "exception: " << e.what() << endl;
diff --git a/tests/test-get-async.cpp b/tests/test-get-async.cpp
index 6524331..fc3a2ca 100644
--- a/tests/test-get-async.cpp
+++ b/tests/test-get-async.cpp
@@ -7,7 +7,7 @@
 #include <sstream>
 #include <iostream>
 #include <ndn-cpp/Interest.hpp>
-#include <ndn-cpp/ContentObject.hpp>
+#include <ndn-cpp/data.hpp>
 #include <ndn-cpp/transport/UdpTransport.hpp>
 #include <ndn-cpp/NDN.hpp>
 
@@ -24,11 +24,11 @@
   
   virtual UpcallResult upcall(UpcallKind kind, UpcallInfo &upcallInfo)
   {
-    if (kind == UPCALL_CONTENT || kind == UPCALL_CONTENT_UNVERIFIED) {
+    if (kind == UPCALL_DATA || kind == UPCALL_DATA_UNVERIFIED) {
       gotContent_ = true;
-      cout << "Got content with name " << upcallInfo.getContentObject()->getName().to_uri() << endl;
-      for (unsigned int i = 0; i < upcallInfo.getContentObject()->getContent().size(); ++i)
-        cout << upcallInfo.getContentObject()->getContent()[i];
+      cout << "Got data packet with name " << upcallInfo.getData()->getName().to_uri() << endl;
+      for (unsigned int i = 0; i < upcallInfo.getData()->getContent().size(); ++i)
+        cout << upcallInfo.getData()->getContent()[i];
       cout << endl;
       
       return CLOSURE_RESULT_OK;
