diff --git a/tests/test-get-async.cpp b/tests/test-get-async.cpp
index a185386..d34ef2a 100644
--- a/tests/test-get-async.cpp
+++ b/tests/test-get-async.cpp
@@ -8,6 +8,7 @@
 #include <iostream>
 #include <ndn-cpp/Interest.hpp>
 #include <ndn-cpp/ContentObject.hpp>
+#include <ndn-cpp/encoding/BinaryXMLStructureDecoder.hpp>
 #include <ndn-cpp/c/network/TcpTransport.h>
 
 using namespace std;
@@ -28,20 +29,34 @@
     if (error = ndn_TcpTransport_send(&transport, &encoding[0], encoding.size()))
       return error;
 
+    BinaryXMLStructureDecoder structureDecoder;
+    vector<unsigned char> element;
     unsigned char buffer[8000];
     unsigned int nBytes;
-    while (1) {
-      if (error = ndn_TcpTransport_receive(&transport, buffer, sizeof(buffer), &nBytes))
-        return error;
-      if (buffer[0] == 0x04)
-        break;    
+    while (true) {
+      while (true) {
+        if (error = ndn_TcpTransport_receive(&transport, buffer, sizeof(buffer), &nBytes))
+          return error;
+        element.insert(element.end(), buffer, buffer + nBytes);
+        if (structureDecoder.findElementEnd(&element[0], element.size()))
+          break;
+      }
+      
+      if (element[0] == 0x04)
+        // Assume this is a ContentObject.
+        break;
+      
+      // Erase this element and try again.
+      element.erase(element.begin(), element.begin() + structureDecoder.getOffset());
     }
-    
-    for (int i = 0; i < nBytes; ++i)
-      printf("%02X ", (unsigned int)buffer[i]);
-    
+        
     ContentObject contentObject;
-    contentObject.decode(buffer, nBytes);
+    contentObject.decode(&element[0], structureDecoder.getOffset());
+    
+    cout << "Got content with name " << contentObject.getName().to_uri() << endl;
+    for (unsigned int i = 0; i < contentObject.getContent().size(); ++i)
+      cout << contentObject.getContent()[i];
+    cout << endl;
   } catch (exception &e) {
     cout << "exception: " << e.what() << endl;
   }
