Ensure prefix registration connects the underlying transport
diff --git a/src/main/java/com/intel/jndn/mock/MockFace.java b/src/main/java/com/intel/jndn/mock/MockFace.java
index e1a62de..6a9a11a 100644
--- a/src/main/java/com/intel/jndn/mock/MockFace.java
+++ b/src/main/java/com/intel/jndn/mock/MockFace.java
@@ -497,6 +497,10 @@
@Override
public long registerPrefix(Name prefix, OnInterest onInterest, OnRegisterFailed onRegisterFailed,
ForwardingFlags flags, WireFormat wireFormat) throws IOException, net.named_data.jndn.security.SecurityException {
+ // since we don't send an Interest, ensure the transport is connected
+ if (!getTransport().getIsConnected())
+ getTransport().connect(node_.getConnectionInfo(), node_);
+
lastRegisteredId++;
handlerMap.put(lastRegisteredId, new MockOnInterestHandler(prefix, onInterest, flags));
return lastRegisteredId;