diff --git a/tests/test-encode-decode-data.cpp b/tests/test-encode-decode-data.cpp
index 1e4c165..616b4b0 100644
--- a/tests/test-encode-decode-data.cpp
+++ b/tests/test-encode-decode-data.cpp
@@ -155,7 +155,7 @@
     dumpData(data);
     cout << "Decoded Data signature verification: " << (KeyChain::selfVerifyData(Data1, sizeof(Data1)) ? "VERIFIED" : "FAILED") << endl;
     
-    ptr_lib::shared_ptr<vector<unsigned char> > encoding = data.wireEncode();
+    Blob encoding = data.wireEncode();
     
     Data reDecodedData;
     reDecodedData.wireDecode(*encoding);
@@ -171,7 +171,7 @@
     KeyChain::defaultSign(freshData);
     cout << endl << "Freshly-signed Data:" << endl;
     dumpData(freshData);
-    ptr_lib::shared_ptr<vector<unsigned char> > freshEncoding = freshData.wireEncode();
+    Blob freshEncoding = freshData.wireEncode();
     cout << "Freshly-signed Data signature verification: " << (KeyChain::selfVerifyData(&freshEncoding->front(), freshEncoding->size()) ? "VERIFIED" : "FAILED") << endl;
   } catch (exception& e) {
     cout << "exception: " << e.what() << endl;
diff --git a/tests/test-encode-decode-forwarding-entry.cpp b/tests/test-encode-decode-forwarding-entry.cpp
index dfa780e..1ee801a 100644
--- a/tests/test-encode-decode-forwarding-entry.cpp
+++ b/tests/test-encode-decode-forwarding-entry.cpp
@@ -59,6 +59,9 @@
 
 static inline string toString(const vector<unsigned char>& v)
 {
+  if (!&v)
+    return "";
+  
   return string(&v[0], &v[0] + v.size());
 }
 
@@ -67,7 +70,7 @@
   cout << "action: " << forwardingEntry.getAction() << endl;
   cout << "prefix: " << forwardingEntry.getPrefix().to_uri() << endl;
   cout << "publisherPublicKeyDigest: " 
-       << (forwardingEntry.getPublisherPublicKeyDigest().getPublisherPublicKeyDigest().size() > 0 ? toHex(forwardingEntry.getPublisherPublicKeyDigest().getPublisherPublicKeyDigest()) : "<none>") << endl;
+       << (forwardingEntry.getPublisherPublicKeyDigest().getPublisherPublicKeyDigest().size() > 0 ? toHex(*forwardingEntry.getPublisherPublicKeyDigest().getPublisherPublicKeyDigest()) : "<none>") << endl;
   cout << "faceId: ";
   if (forwardingEntry.getFaceId() >= 0)
     cout << forwardingEntry.getFaceId() << endl;
@@ -101,16 +104,16 @@
     cout << interest.getScope() << endl;
   else
     cout << "<none>" << endl;
-  cout << "name[0]: " << toString(interest.getName().getComponent(0).getValue()) << endl;
-  cout << "name[1]: " << toHex(interest.getName().getComponent(1).getValue()) << endl;
-  cout << "name[2]: " << toString(interest.getName().getComponent(2).getValue()) << endl;
+  cout << "name[0]: " << toString(*interest.getName().getComponent(0).getValue()) << endl;
+  cout << "name[1]: " << toHex(*interest.getName().getComponent(1).getValue()) << endl;
+  cout << "name[2]: " << toString(*interest.getName().getComponent(2).getValue()) << endl;
   cout << "name[3] decoded as Data, showing content as ForwardingEntry: " << endl;
   
   Data data;
-  data.wireDecode(interest.getName().getComponent(3).getValue());
+  data.wireDecode(*interest.getName().getComponent(3).getValue());
   
   ForwardingEntry forwardingEntry;
-  forwardingEntry.wireDecode(data.getContent());
+  forwardingEntry.wireDecode(*data.getContent());
   dumpForwardingEntry(forwardingEntry);
 }
 
@@ -122,7 +125,7 @@
     cout << "Interest:" << endl;
     dumpInterestWithForwardingEntry(interest);
     
-    ptr_lib::shared_ptr<vector<unsigned char> > encoding = interest.wireEncode();
+    Blob encoding = interest.wireEncode();
     cout << endl << "Re-encoded interest " << toHex(*encoding) << endl;
 
     Interest reDecodedInterest;
diff --git a/tests/test-encode-decode-interest.cpp b/tests/test-encode-decode-interest.cpp
index ad638ce..9326893 100644
--- a/tests/test-encode-decode-interest.cpp
+++ b/tests/test-encode-decode-interest.cpp
@@ -44,7 +44,7 @@
   else
     cout << "<none>" << endl;
   cout << "publisherPublicKeyDigest: " 
-       << (interest.getPublisherPublicKeyDigest().getPublisherPublicKeyDigest().size() > 0 ? toHex(interest.getPublisherPublicKeyDigest().getPublisherPublicKeyDigest()) : "<none>") << endl;
+       << (interest.getPublisherPublicKeyDigest().getPublisherPublicKeyDigest().size() > 0 ? toHex(*interest.getPublisherPublicKeyDigest().getPublisherPublicKeyDigest()) : "<none>") << endl;
   cout << "exclude: " 
        << (interest.getExclude().getEntryCount() > 0 ? interest.getExclude().toUri() : "<none>") << endl;
   cout << "lifetimeMilliseconds: ";
@@ -79,7 +79,7 @@
     cout << "Interest:" << endl;
     dumpInterest(interest);
     
-    ptr_lib::shared_ptr<vector<unsigned char> > encoding = interest.wireEncode();
+    Blob encoding = interest.wireEncode();
     cout << endl << "Re-encoded interest " << toHex(*encoding) << endl;
 
     Interest reDecodedInterest;
diff --git a/tests/test-get-async.cpp b/tests/test-get-async.cpp
index 3c55b31..7c92997 100644
--- a/tests/test-get-async.cpp
+++ b/tests/test-get-async.cpp
@@ -29,7 +29,7 @@
     ++callbackCount_;
     cout << "Got data packet with name " << data->getName().to_uri() << endl;
     for (unsigned int i = 0; i < data->getContent().size(); ++i)
-      cout << data->getContent()[i];
+      cout << (*data->getContent())[i];
     cout << endl;  
   }
 
diff --git a/tests/test-publish-async.cpp b/tests/test-publish-async.cpp
index 49129c8..87fad40 100644
--- a/tests/test-publish-async.cpp
+++ b/tests/test-publish-async.cpp
@@ -32,7 +32,7 @@
     data.setContent((const unsigned char *)&content[0], content.size());
     data.getMetaInfo().setTimestampMilliseconds(time(NULL) * 1000.0);
     KeyChain::defaultSign(data);
-    shared_ptr<vector<unsigned char> > encodedData = data.wireEncode();
+    Blob encodedData = data.wireEncode();
 
     cout << "Sent content " << content << endl;
     transport.send(*encodedData);
