diff --git a/.gitignore b/.gitignore
index 619d7e5..7ef0804 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,4 +31,8 @@
 .settings
 
 # Netbeans specific project files
-nbactions.xml
\ No newline at end of file
+nbactions.xml
+
+# IntelliJ specific project files
+.idea
+*.iml
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 5e4b3b1..2e9135f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
 	<modelVersion>4.0.0</modelVersion>
 	<groupId>com.intel.jndn.utils</groupId>
 	<artifactId>jndn-utils</artifactId>
-	<version>1.0.0</version>
+	<version>1.0.2</version>
 	<name>jndn-utils</name>
 	<description>Collection of tools to simplify synchronous and asynchronous data transfer over the NDN network</description>
 	<url>https://github.com/01org/jndn-utils</url>
@@ -35,7 +35,7 @@
 		<dependency>
 			<groupId>net.named-data</groupId>
 			<artifactId>jndn</artifactId>
-			<version>0.7</version>
+			<version>0.11</version>
 		</dependency>
 		<!-- Test dependencies -->
 		<dependency>
@@ -47,7 +47,7 @@
 		<dependency>
 			<groupId>com.intel.jndn.mock</groupId>
 			<artifactId>jndn-mock</artifactId>
-			<version>RELEASE</version>
+			<version>1.0.2</version>
 			<scope>test</scope>
 		</dependency>
 	</dependencies>
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 67058d6..26942d0 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
@@ -16,10 +16,7 @@
 import com.intel.jndn.mock.MockFace;
 import com.intel.jndn.utils.TestHelper;
 import com.intel.jndn.utils.client.SegmentationType;
-import java.io.IOException;
-import java.util.List;
-import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.Future;
+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;
@@ -27,17 +24,33 @@
 import net.named_data.jndn.Name;
 import net.named_data.jndn.OnInterestCallback;
 import net.named_data.jndn.util.Blob;
-import static org.junit.Assert.*;
+import org.junit.Before;
 import org.junit.Test;
 
+import java.io.IOException;
+import java.util.List;
+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;
+
 /**
  *
  * @author Andrew Brown <andrew.brown@intel.com>
  */
 public class AdvancedClientTest {
 
-  MockFace face = new MockFace();
-  AdvancedClient instance = new AdvancedClient();
+  MockFace face;
+  AdvancedClient instance;
+
+  @Before
+  public void before() throws Exception {
+    face = new MockFace();
+    instance = new AdvancedClient();
+  }
 
   @Test
   public void testRetries() throws Exception {
@@ -91,11 +104,11 @@
   public void testWhenDataNameIsLongerThanInterestName() throws Exception {
     final List<Data> segments = TestHelper.buildSegments(new Name("/a/b/c/d"), 0, 10);
     for (Data segment : segments) {
-      face.addResponse(segment.getName(), segment);
+      face.receive(segment);
     }
 
     Name name = new Name("/a/b");
-    face.addResponse(name, segments.get(0));
+    face.receive(segments.get(0));
 
     Data data = instance.getSync(face, name);
     assertNotNull(data);
@@ -112,7 +125,7 @@
   public void testNoContent() throws Exception {
     Name name = new Name("/test/no-content").appendSegment(0);
     Data data = TestHelper.buildData(name, "", 0);
-    face.addResponse(name, data);
+    face.receive(data);
 
     Future<Data> result = instance.getAsync(face, name);
     face.processEvents();
@@ -131,12 +144,12 @@
     Data data1 = new Data(new Name("/test/content-length").appendSegment(0));
     data1.setContent(new Blob("0123456789"));
     data1.getMetaInfo().setFinalBlockId(Name.Component.fromNumberWithMarker(1, 0x00));
-    face.addResponse(data1.getName(), data1);
+    face.receive(data1);
 
     Data data2 = new Data(new Name("/test/content-length").appendSegment(1));
     data2.setContent(new Blob("0123456789"));
     data1.getMetaInfo().setFinalBlockId(Name.Component.fromNumberWithMarker(1, 0x00));
-    face.addResponse(data2.getName(), data2);
+    face.receive(data2);
 
     Future<Data> result = instance.getAsync(face, new Name("/test/content-length").appendSegment(0));
     face.processEvents();
@@ -155,7 +168,7 @@
     Name name = new Name("/test/no-final-block-id");
     Data data = new Data(name);
     data.setContent(new Blob("1"));
-    face.addResponse(name, data);
+    face.receive(data);
 
     Future<Data> result = instance.getAsync(face, name);
     face.processEvents();
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 aa0549a..6cf256b 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
@@ -15,16 +15,20 @@
 
 import com.intel.jndn.mock.MockFace;
 import com.intel.jndn.utils.TestHelper.TestCounter;
-import java.io.IOException;
 import net.named_data.jndn.Data;
 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 static org.junit.Assert.*;
+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
  *
@@ -32,12 +36,18 @@
  */
 public class DefaultRetryClientTest {
 
-  DefaultRetryClient client = new DefaultRetryClient(3);
-  MockFace face = new MockFace();
+  DefaultRetryClient client;
+  MockFace face;
   Name name = new Name("/test/retry/client");
   Interest interest = new Interest(name, 0.0);
   TestCounter counter = new TestCounter();
 
+  @Before
+  public void before() throws Exception {
+    face = new MockFace();
+    client = new DefaultRetryClient(3);
+  }
+
   @Test
   public void testRetry() throws Exception {
 
@@ -67,7 +77,7 @@
   }
 
   protected void respondToRetryAttempt() throws IOException, EncodingException {
-    face.getTransport().respondWith(new Data(name));
+    face.receive(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 2d65724..060350b 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
@@ -17,13 +17,13 @@
 import com.intel.jndn.utils.TestHelper;
 import com.intel.jndn.utils.TestHelper.TestCounter;
 import com.intel.jndn.utils.client.DataStream;
-import java.util.Random;
 import net.named_data.jndn.Data;
 import net.named_data.jndn.Interest;
 import net.named_data.jndn.Name;
-import static org.junit.Assert.assertEquals;
 import org.junit.Test;
 
+import static org.junit.Assert.assertEquals;
+
 /**
  * Test DefaultSegmentedClient
  *
@@ -88,7 +88,7 @@
     }
 
     assertEquals(5, counter.count);
-    assertEquals(5, face.getTransport().getSentInterestPackets().size());
+    assertEquals(5, face.sentInterests.size());
     assertEquals("01234", stream.assemble().getContent().toString());
   }
 }
diff --git a/src/test/java/com/intel/jndn/utils/client/impl/SimpleClientTest.java b/src/test/java/com/intel/jndn/utils/client/impl/SimpleClientTest.java
index 41e461c..4e529be 100644
--- a/src/test/java/com/intel/jndn/utils/client/impl/SimpleClientTest.java
+++ b/src/test/java/com/intel/jndn/utils/client/impl/SimpleClientTest.java
@@ -13,11 +13,15 @@
  */
 package com.intel.jndn.utils.client.impl;
 
-import com.intel.jndn.utils.client.impl.SimpleClient;
 import com.intel.jndn.mock.MockFace;
+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;
 import org.junit.Test;
-import static org.junit.Assert.*;
-import com.intel.jndn.mock.MockTransport;
+import org.junit.rules.ExpectedException;
+
 import java.io.IOException;
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.ExecutionException;
@@ -25,13 +29,9 @@
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 import java.util.logging.Logger;
-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.encoding.EncodingException;
-import net.named_data.jndn.util.Blob;
-import org.junit.rules.ExpectedException;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 /**
  * Test SimpleClient.java
@@ -44,15 +44,14 @@
   public ExpectedException thrown = ExpectedException.none();
 
   @Test
-  public void testGetSync() throws IOException {
+  public void testGetSync() throws Exception {
     // setup face
-    MockTransport transport = new MockTransport();
-    Face face = new Face(transport, null);
+    MockFace face = new MockFace();
 
     // setup return data
     Data response = new Data(new Name("/test/sync"));
     response.setContent(new Blob("..."));
-    transport.respondWith(response);
+    face.receive(response);
 
     // retrieve data
     logger.info("Client expressing interest synchronously: /test/sync");
@@ -62,15 +61,14 @@
   }
 
   @Test
-  public void testGetAsync() throws InterruptedException, ExecutionException, IOException, EncodingException {
+  public void testGetAsync() throws Exception {
     // setup face
-    MockTransport transport = new MockTransport();
-    Face face = new Face(transport, null);
+    MockFace face = new MockFace();
 
     // setup return data
     Data response = new Data(new Name("/test/async"));
     response.setContent(new Blob("..."));
-    transport.respondWith(response);
+    face.receive(response);
 
     // retrieve data
     logger.info("Client expressing interest asynchronously: /test/async");
@@ -87,8 +85,7 @@
   @Test
   public void testTimeout() throws Exception {
     // setup face
-    MockTransport transport = new MockTransport();
-    Face face = new Face(transport, null);
+    MockFace face = new MockFace();
 
     // retrieve non-existent data, should timeout
     logger.info("Client expressing interest asynchronously: /test/timeout");
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 71f505e..409edbe 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
@@ -21,6 +21,8 @@
 import net.named_data.jndn.Name;
 import net.named_data.jndn.util.Blob;
 import static org.junit.Assert.*;
+
+import org.junit.Before;
 import org.junit.Test;
 
 /**
@@ -29,8 +31,14 @@
  */
 public class SegmentedServerTest {
 
-  MockFace face = new MockFace();
-  SegmentedServer instance = new SegmentedServer(face, new Name("/test/prefix"));
+  MockFace face;
+  SegmentedServer instance;
+
+  @Before
+  public void before() throws Exception {
+    face = new MockFace();
+    instance = new SegmentedServer(face, new Name("/test/prefix"));
+  }
 
   @Test
   public void testGetPrefix() {
diff --git a/src/test/java/com/intel/jndn/utils/server/impl/ServerBaseImplTest.java b/src/test/java/com/intel/jndn/utils/server/impl/ServerBaseImplTest.java
index 767a021..bd054cc 100644
--- a/src/test/java/com/intel/jndn/utils/server/impl/ServerBaseImplTest.java
+++ b/src/test/java/com/intel/jndn/utils/server/impl/ServerBaseImplTest.java
@@ -22,6 +22,7 @@
 import net.named_data.jndn.Interest;
 import net.named_data.jndn.InterestFilter;
 import net.named_data.jndn.Name;
+import org.junit.Before;
 import org.junit.Test;
 import static org.junit.Assert.*;
 
@@ -32,8 +33,14 @@
  */
 public class ServerBaseImplTest {
 
-  Face face = new MockFace();
-  ServerBaseImpl instance = new ServerBaseImplImpl(face, new Name("/test/base"));
+  Face face;
+  ServerBaseImpl instance;
+
+  @Before
+  public void before() throws Exception {
+    face = new MockFace();
+    instance = new ServerBaseImplImpl(face, new Name("/test/base"));
+  }
 
   public class ServerBaseImplImpl extends ServerBaseImpl {
 
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 e3766b2..01df6f2 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
@@ -24,6 +24,8 @@
 import net.named_data.jndn.encoding.EncodingException;
 import net.named_data.jndn.util.Blob;
 import static org.junit.Assert.*;
+
+import org.junit.Before;
 import org.junit.Test;
 
 /**
@@ -33,8 +35,14 @@
  */
 public class SimpleServerTest {
 
-  MockFace face = new MockFace();
-  SimpleServer instance = new SimpleServer(face, new Name("/test/prefix"));
+  MockFace face;
+  SimpleServer instance;
+
+  @Before
+  public void before() throws Exception {
+    face = new MockFace();
+    instance = new SimpleServer(face, new Name("/test/prefix"));
+  }
 
   @Test
   public void testGetPrefix() {
@@ -81,7 +89,7 @@
 
   private void sendAndCheckOneInterest(Name interestName) throws EncodingException, IOException {
     Interest interest = new Interest(interestName);
-    face.getTransport().clear();
+
     face.expressInterest(interest, new OnData() {
       @Override
       public void onData(Interest interest, Data data) {
@@ -90,7 +98,7 @@
     });
 
     face.processEvents();
-    assertEquals(1, face.getTransport().getSentDataPackets().size());
-    assertEquals("...", face.getTransport().getSentDataPackets().get(0).getContent().toString());
+    assertEquals(1, face.sentData.size());
+    assertEquals("...", face.sentData.get(0).getContent().toString());
   }
 }
