diff --git a/src/test/java/com/intel/jndn/management/FaceStatusTest.java b/src/test/java/com/intel/jndn/management/FaceStatusTest.java
index 2bf7ce6..5a587a6 100644
--- a/src/test/java/com/intel/jndn/management/FaceStatusTest.java
+++ b/src/test/java/com/intel/jndn/management/FaceStatusTest.java
@@ -15,7 +15,8 @@
 
 import com.intel.jndn.management.types.StatusDataset;
 import com.intel.jndn.management.types.FaceStatus;
-import com.intel.jndn.utils.Client;
+import com.intel.jndn.utils.SimpleClient;
+import java.io.IOException;
 import java.util.List;
 import java.util.logging.Logger;
 import junit.framework.Assert;
@@ -113,7 +114,7 @@
    * @param usePreComputedData to avoid errors when local NFD is not present
    * @return
    */
-  private static Data getFaceData(boolean usePreComputedData) {
+  private static Data getFaceData(boolean usePreComputedData) throws IOException {
     // use pre-computed data to avoid errors when local NFD is not present
     if (usePreComputedData) {
       Data data = new Data();
@@ -130,7 +131,7 @@
       interest.setInterestLifetimeMilliseconds(2000.0);
 
       // send packet
-      Data data = Client.getDefault().getSync(forwarder, interest);
+      Data data = SimpleClient.getDefault().getSync(forwarder, interest);
       String hex = data.getContent().toHex();
       logger.info("Hex dump of face list: " + hex);
       return data;
diff --git a/src/test/java/com/intel/jndn/management/FibEntryTest.java b/src/test/java/com/intel/jndn/management/FibEntryTest.java
index 026178f..1cd5897 100644
--- a/src/test/java/com/intel/jndn/management/FibEntryTest.java
+++ b/src/test/java/com/intel/jndn/management/FibEntryTest.java
@@ -16,7 +16,7 @@
 import com.intel.jndn.management.types.StatusDataset;
 import com.intel.jndn.management.types.NextHopRecord;
 import com.intel.jndn.management.types.FibEntry;
-import com.intel.jndn.utils.Client;
+import com.intel.jndn.utils.SimpleClient;
 import java.util.List;
 import junit.framework.Assert;
 import net.named_data.jndn.Data;
@@ -79,7 +79,7 @@
     interest.setInterestLifetimeMilliseconds(2000.0);
 
     // send packet
-    Data data = Client.getDefault().getSync(forwarder, interest);
+    Data data = SimpleClient.getDefault().getSync(forwarder, interest);
 
     // decode results
     List<FibEntry> results = StatusDataset.wireDecode(data.getContent(), FibEntry.class);
diff --git a/src/test/java/com/intel/jndn/management/IntegrationSuite.java b/src/test/java/com/intel/jndn/management/IntegrationSuite.java
index f0167b5..e94b328 100644
--- a/src/test/java/com/intel/jndn/management/IntegrationSuite.java
+++ b/src/test/java/com/intel/jndn/management/IntegrationSuite.java
@@ -13,6 +13,7 @@
  */
 package com.intel.jndn.management;
 
+import com.intel.jndn.management.types.RibEntry;
 import java.util.logging.Logger;
 import junit.framework.Assert;
 import net.named_data.jndn.Face;
@@ -48,10 +49,19 @@
     Assert.assertFalse(NFD.getRouteList(face).isEmpty());
 
     // create a new route
-    Assert.assertTrue(NFD.register(face, "udp4://127.0.0.1:56363", new Name("/my/test/route"), 999));
+    NFD.register(face, "udp4://127.0.0.1:56363", new Name("/my/test/route"), 999);
+    
+    // check that route is created
+    boolean found = false;
+    for(RibEntry route : NFD.getRouteList(face)){
+      if(route.getName().equals(new Name("/my/test/route"))){
+        found = true;
+      }
+    }
+    Assert.assertTrue(found);
 
     // remove the route
-    Assert.assertTrue(NFD.unregister(face, new Name("/my/test/route"), "udp4://127.0.0.1:56363"));
+    NFD.unregister(face, new Name("/my/test/route"), "udp4://127.0.0.1:56363");
   }
 
   /**
diff --git a/src/test/java/com/intel/jndn/management/LocalControlHeaderTest.java b/src/test/java/com/intel/jndn/management/LocalControlHeaderTest.java
index 2034d13..7686616 100644
--- a/src/test/java/com/intel/jndn/management/LocalControlHeaderTest.java
+++ b/src/test/java/com/intel/jndn/management/LocalControlHeaderTest.java
@@ -14,8 +14,9 @@
 package com.intel.jndn.management;
 
 import com.intel.jndn.management.types.LocalControlHeader;
-import com.intel.jndn.utils.Client;
+import com.intel.jndn.utils.SimpleClient;
 import java.util.logging.Logger;
+import junit.framework.Assert;
 import net.named_data.jndn.Data;
 import net.named_data.jndn.Face;
 import net.named_data.jndn.Name;
@@ -45,12 +46,12 @@
     forwarder.setCommandSigningInfo(keyChain, keyChain.getDefaultCertificateName());
 
     // enable incoming face ID header
-    boolean success = NFD.enableLocalControlHeader(forwarder, LocalControlHeader.INCOMING_FACE_ID);
-    assertTrue(success);
+    NFD.enableLocalControlHeader(forwarder, LocalControlHeader.INCOMING_FACE_ID);
     
     // use and verify
-    Data data = Client.getDefault().getSync(forwarder, new Name("/localhost/nfd"));
+    Data data = SimpleClient.getDefault().getSync(forwarder, new Name("/localhost/nfd"));
     long faceId = data.getIncomingFaceId();
+    Assert.assertTrue(faceId != -1); // this verifies that the headers are working correctly
     logger.info("Face ID for this client on the forwarder: " + faceId);
   }
 }
diff --git a/src/test/java/com/intel/jndn/management/RibEntryTest.java b/src/test/java/com/intel/jndn/management/RibEntryTest.java
index ea54fbd..8a63abb 100644
--- a/src/test/java/com/intel/jndn/management/RibEntryTest.java
+++ b/src/test/java/com/intel/jndn/management/RibEntryTest.java
@@ -16,7 +16,7 @@
 import com.intel.jndn.management.types.StatusDataset;
 import com.intel.jndn.management.types.RibEntry;
 import com.intel.jndn.management.types.Route;
-import com.intel.jndn.utils.Client;
+import com.intel.jndn.utils.SimpleClient;
 import java.util.List;
 import junit.framework.Assert;
 import net.named_data.jndn.Data;
@@ -81,7 +81,7 @@
     interest.setInterestLifetimeMilliseconds(2000.0);
 
     // send packet
-    Data data = Client.getDefault().getSync(forwarder, interest);
+    Data data = SimpleClient.getDefault().getSync(forwarder, interest);
 
     // decode results
     List<RibEntry> results = StatusDataset.wireDecode(data.getContent(), RibEntry.class);
