diff --git a/pom.xml b/pom.xml
index 6c5c33e..0c7428a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -55,7 +55,7 @@
     <dependency>
       <groupId>com.intel.jndn.mock</groupId>
       <artifactId>jndn-mock</artifactId>
-      <version>1.0.3</version>
+      <version>1.1.0</version>
       <scope>test</scope>
     </dependency>
   </dependencies>
diff --git a/src/main/java/com/intel/jndn/utils/client/impl/AdvancedClient.java b/src/main/java/com/intel/jndn/utils/client/impl/AdvancedClient.java
index be1e876..2659656 100644
--- a/src/main/java/com/intel/jndn/utils/client/impl/AdvancedClient.java
+++ b/src/main/java/com/intel/jndn/utils/client/impl/AdvancedClient.java
@@ -150,7 +150,7 @@
       this.face = face;
       this.stream = stream;
     }
-    
+
     @Override
     public void onTimeout(Interest failedInterest) {
       logger.info("Timeout: " + failedInterest.toUri());
diff --git a/src/main/java/com/intel/jndn/utils/client/impl/DefaultRetryClient.java b/src/main/java/com/intel/jndn/utils/client/impl/DefaultRetryClient.java
index f984ac2..21f1c0e 100644
--- a/src/main/java/com/intel/jndn/utils/client/impl/DefaultRetryClient.java
+++ b/src/main/java/com/intel/jndn/utils/client/impl/DefaultRetryClient.java
@@ -32,7 +32,7 @@
 
   private static final Logger logger = Logger.getLogger(DefaultRetryClient.class.getName());
   private final int numRetriesAllowed;
-  private int totalRetries = 0;
+  private volatile int totalRetries = 0;
 
   public DefaultRetryClient(int numRetriesAllowed) {
     this.numRetriesAllowed = numRetriesAllowed;
diff --git a/src/test/java/com/intel/jndn/utils/client/impl/AdvancedClientTest.java b/src/test/java/com/intel/jndn/utils/client/impl/AdvancedClientTest.java
index 26942d0..3ee3bb8 100644
--- a/src/test/java/com/intel/jndn/utils/client/impl/AdvancedClientTest.java
+++ b/src/test/java/com/intel/jndn/utils/client/impl/AdvancedClientTest.java
@@ -14,9 +14,9 @@
 package com.intel.jndn.utils.client.impl;
 
 import com.intel.jndn.mock.MockFace;
+import com.intel.jndn.mock.MockForwarder;
 import com.intel.jndn.utils.TestHelper;
 import com.intel.jndn.utils.client.SegmentationType;
-import com.intel.jndn.utils.server.impl.SimpleServer;
 import net.named_data.jndn.Data;
 import net.named_data.jndn.Face;
 import net.named_data.jndn.Interest;
@@ -32,22 +32,20 @@
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.Future;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.Assert.*;
 
 /**
- *
- * @author Andrew Brown <andrew.brown@intel.com>
+ * @author Andrew Brown, andrew.brown@intel.com
  */
 public class AdvancedClientTest {
 
-  MockFace face;
-  AdvancedClient instance;
+  private MockFace face;
+  private AdvancedClient instance;
+  private MockForwarder forwarder;
 
   @Before
   public void before() throws Exception {
+    forwarder = new MockForwarder();
     face = new MockFace();
     instance = new AdvancedClient();
   }
@@ -70,8 +68,8 @@
   public void testGetSync() throws Exception {
     Name name = new Name("/segmented/data");
 
+    Face face = forwarder.connect();
     face.registerPrefix(name, new OnInterestCallback() {
-      private int count = 0;
       private int max = 9;
 
       @Override
@@ -93,12 +91,12 @@
     Data data = instance.getSync(face, new Name(name).appendSegment(0));
     assertEquals(10, data.getContent().size());
   }
-  
-    /**
+
+  /**
    * Verify that Data returned with a different Name than the Interest is still
    * segmented correctly.
    *
-   * @throws Exception
+   * @throws Exception if client fails
    */
   @Test
   public void testWhenDataNameIsLongerThanInterestName() throws Exception {
@@ -119,7 +117,7 @@
    * Verify that Data packets with no content do not cause errors; identifies
    * bug.
    *
-   * @throws Exception
+   * @throws Exception if client fails
    */
   @Test
   public void testNoContent() throws Exception {
@@ -137,7 +135,7 @@
    * Verify that segmented content is the correct length when retrieved by the
    * client.
    *
-   * @throws Exception
+   * @throws Exception if client fails
    */
   @Test
   public void testContentLength() throws Exception {
@@ -159,9 +157,9 @@
 
   /**
    * If a Data packet does not have a FinalBlockId, the AdvancedClient should
- just return the packet.
+   * just return the packet.
    *
-   * @throws Exception
+   * @throws Exception if client fails
    */
   @Test
   public void testNoFinalBlockId() throws Exception {
diff --git a/src/test/java/com/intel/jndn/utils/client/impl/DefaultRetryClientTest.java b/src/test/java/com/intel/jndn/utils/client/impl/DefaultRetryClientTest.java
index 6cf256b..f529b58 100644
--- a/src/test/java/com/intel/jndn/utils/client/impl/DefaultRetryClientTest.java
+++ b/src/test/java/com/intel/jndn/utils/client/impl/DefaultRetryClientTest.java
@@ -13,71 +13,57 @@
  */
 package com.intel.jndn.utils.client.impl;
 
-import com.intel.jndn.mock.MockFace;
+import com.intel.jndn.mock.MockForwarder;
 import com.intel.jndn.utils.TestHelper.TestCounter;
 import net.named_data.jndn.Data;
+import net.named_data.jndn.Face;
 import net.named_data.jndn.Interest;
 import net.named_data.jndn.Name;
-import net.named_data.jndn.OnData;
-import net.named_data.jndn.OnTimeout;
-import net.named_data.jndn.encoding.EncodingException;
 import org.junit.Before;
 import org.junit.Test;
 
-import java.io.IOException;
-
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
 
 /**
  * Test DefaultRetryClient
  *
- * @author Andrew Brown <andrew.brown@intel.com>
+ * @author Andrew Brown, andrew.brown@intel.com
  */
 public class DefaultRetryClientTest {
 
-  DefaultRetryClient client;
-  MockFace face;
-  Name name = new Name("/test/retry/client");
-  Interest interest = new Interest(name, 0.0);
-  TestCounter counter = new TestCounter();
+  private static final double INTEREST_LIFETIME_MS = 1.0;
+  private DefaultRetryClient client;
+  private Name name = new Name("/test/retry/client");
+  private Interest interest = new Interest(name, INTEREST_LIFETIME_MS);
+  private TestCounter counter = new TestCounter();
 
   @Before
   public void before() throws Exception {
-    face = new MockFace();
     client = new DefaultRetryClient(3);
   }
 
   @Test
   public void testRetry() throws Exception {
-
-    client.retry(face, interest, new OnData() {
-      @Override
-      public void onData(Interest interest, Data data) {
-        counter.count++;
-      }
-    }, new OnTimeout() {
-      @Override
-      public void onTimeout(Interest interest) {
-        fail("Should not timeout.");
-      }
-    });
+    MockForwarder forwarder = new MockForwarder();
+    Face face = forwarder.connect();
+    client.retry(face, interest, (interest1, data) -> counter.count++, interest2 -> fail("Should not timeout."));
     assertEquals(1, client.totalRetries());
 
-    timeoutAndVerifyRetry(2);
-    timeoutAndVerifyRetry(3);
-    respondToRetryAttempt();
+    timeoutAndVerifyRetry(face, 2);
+    timeoutAndVerifyRetry(face, 3);
+    respondToRetryAttempt(face);
   }
 
-  private void timeoutAndVerifyRetry(int retryCount) throws Exception {
-    Thread.sleep(1);
+  private void timeoutAndVerifyRetry(Face face, int retryCount) throws Exception {
+    Thread.sleep((long) INTEREST_LIFETIME_MS + 1); // necessary to timeout the pending interest
     face.processEvents();
     assertEquals(retryCount, client.totalRetries());
     assertEquals(0, counter.count);
   }
 
-  protected void respondToRetryAttempt() throws IOException, EncodingException {
-    face.receive(new Data(name));
+  private void respondToRetryAttempt(Face face) throws Exception {
+    face.putData(new Data(name));
     face.processEvents();
     assertEquals(1, counter.count);
   }
diff --git a/src/test/java/com/intel/jndn/utils/client/impl/DefaultSegmentedClientTest.java b/src/test/java/com/intel/jndn/utils/client/impl/DefaultSegmentedClientTest.java
index 060350b..05c85f5 100644
--- a/src/test/java/com/intel/jndn/utils/client/impl/DefaultSegmentedClientTest.java
+++ b/src/test/java/com/intel/jndn/utils/client/impl/DefaultSegmentedClientTest.java
@@ -13,11 +13,14 @@
  */
 package com.intel.jndn.utils.client.impl;
 
+import com.intel.jndn.mock.MeasurableFace;
 import com.intel.jndn.mock.MockFace;
+import com.intel.jndn.mock.MockForwarder;
 import com.intel.jndn.utils.TestHelper;
 import com.intel.jndn.utils.TestHelper.TestCounter;
 import com.intel.jndn.utils.client.DataStream;
 import net.named_data.jndn.Data;
+import net.named_data.jndn.Face;
 import net.named_data.jndn.Interest;
 import net.named_data.jndn.Name;
 import org.junit.Test;
@@ -27,11 +30,11 @@
 /**
  * Test DefaultSegmentedClient
  *
- * @author Andrew Brown <andrew.brown@intel.com>
+ * @author Andrew Brown, andrew.brown@intel.com
  */
 public class DefaultSegmentedClientTest {
 
-  DefaultSegmentedClient instance = new DefaultSegmentedClient();
+  private DefaultSegmentedClient instance = new DefaultSegmentedClient();
 
   @Test
   public void testGetSegmentsAsync() throws Exception {
@@ -41,9 +44,7 @@
     DataStream stream = instance.getSegmentsAsync(face, interest);
 
     TestCounter counter = new TestCounter();
-    stream.observe((i, d) -> {
-      counter.count++;
-    });
+    stream.observe((i, d) -> counter.count++);
 
     for (Data segment : TestHelper.buildSegments(name, 0, 5)) {
       stream.onData(interest, segment);
@@ -72,15 +73,14 @@
 
   @Test
   public void verifyThatSegmentsAreRetrievedOnlyOnce() throws Exception {
-    MockFace face = new MockFace();
+    MockForwarder forwarder = new MockForwarder();
+    Face face = forwarder.connect();
     Name name = new Name("/test/segmented/client");
     Interest interest = new Interest(name);
     DataStream stream = instance.getSegmentsAsync(face, interest);
 
     TestCounter counter = new TestCounter();
-    stream.observe((i, d) -> {
-      counter.count++;
-    });
+    stream.observe((i, d) -> counter.count++);
 
     for (Data segment : TestHelper.buildSegments(name, 0, 5)) {
       face.putData(segment);
@@ -88,7 +88,7 @@
     }
 
     assertEquals(5, counter.count);
-    assertEquals(5, face.sentInterests.size());
+    assertEquals(5, ((MeasurableFace) face).sentInterests().size());
     assertEquals("01234", stream.assemble().getContent().toString());
   }
 }
diff --git a/src/test/java/com/intel/jndn/utils/server/impl/SegmentedServerTest.java b/src/test/java/com/intel/jndn/utils/server/impl/SegmentedServerTest.java
index 409edbe..fd6b516 100644
--- a/src/test/java/com/intel/jndn/utils/server/impl/SegmentedServerTest.java
+++ b/src/test/java/com/intel/jndn/utils/server/impl/SegmentedServerTest.java
@@ -13,10 +13,12 @@
  */
 package com.intel.jndn.utils.server.impl;
 
+import com.intel.jndn.mock.MockForwarder;
 import com.intel.jndn.utils.client.impl.AdvancedClient;
 import com.intel.jndn.mock.MockFace;
 import java.io.IOException;
 import net.named_data.jndn.Data;
+import net.named_data.jndn.Face;
 import net.named_data.jndn.Interest;
 import net.named_data.jndn.Name;
 import net.named_data.jndn.util.Blob;
@@ -31,12 +33,13 @@
  */
 public class SegmentedServerTest {
 
-  MockFace face;
+  Face face;
   SegmentedServer instance;
 
   @Before
   public void before() throws Exception {
-    face = new MockFace();
+    MockForwarder forwarder = new MockForwarder();
+    face = forwarder.connect();
     instance = new SegmentedServer(face, new Name("/test/prefix"));
   }
 
diff --git a/src/test/java/com/intel/jndn/utils/server/impl/SimpleServerTest.java b/src/test/java/com/intel/jndn/utils/server/impl/SimpleServerTest.java
index 01df6f2..4ce40ae 100644
--- a/src/test/java/com/intel/jndn/utils/server/impl/SimpleServerTest.java
+++ b/src/test/java/com/intel/jndn/utils/server/impl/SimpleServerTest.java
@@ -13,11 +13,14 @@
  */
 package com.intel.jndn.utils.server.impl;
 
+import com.intel.jndn.mock.MeasurableFace;
 import com.intel.jndn.mock.MockFace;
+import com.intel.jndn.mock.MockForwarder;
 import com.intel.jndn.utils.server.RespondWithBlob;
 import com.intel.jndn.utils.server.RespondWithData;
 import java.io.IOException;
 import net.named_data.jndn.Data;
+import net.named_data.jndn.Face;
 import net.named_data.jndn.Interest;
 import net.named_data.jndn.Name;
 import net.named_data.jndn.OnData;
@@ -35,12 +38,13 @@
  */
 public class SimpleServerTest {
 
-  MockFace face;
+  Face face;
   SimpleServer instance;
 
   @Before
   public void before() throws Exception {
-    face = new MockFace();
+    MockForwarder forwarder = new MockForwarder();
+    face = forwarder.connect();
     instance = new SimpleServer(face, new Name("/test/prefix"));
   }
 
@@ -90,15 +94,10 @@
   private void sendAndCheckOneInterest(Name interestName) throws EncodingException, IOException {
     Interest interest = new Interest(interestName);
 
-    face.expressInterest(interest, new OnData() {
-      @Override
-      public void onData(Interest interest, Data data) {
-        assertEquals("/test/prefix/response", data.getName().toUri());
-      }
-    });
-
+    face.expressInterest(interest, (interest1, data) -> assertEquals(interestName, data.getName()));
     face.processEvents();
-    assertEquals(1, face.sentData.size());
-    assertEquals("...", face.sentData.get(0).getContent().toString());
+
+    assertEquals(1, ((MeasurableFace) face).sentDatas().size());
+    assertEquals("...", ((MeasurableFace) face).sentDatas().iterator().next().getContent().toString());
   }
 }
