Improve test coverage
Change-Id: Ib3c220638790ea02ad7285916fc98320ecada31b
diff --git a/src/test/java/com/intel/jndn/management/NdnPingClientIT.java b/src/test/java/com/intel/jndn/management/NdnPingClientIT.java
index e0f9562..762ae7c 100644
--- a/src/test/java/com/intel/jndn/management/NdnPingClientIT.java
+++ b/src/test/java/com/intel/jndn/management/NdnPingClientIT.java
@@ -14,12 +14,14 @@
package com.intel.jndn.management;
import net.named_data.jndn.Face;
+import net.named_data.jndn.Name;
import net.named_data.jndn.security.SecurityException;
import org.junit.Before;
import org.junit.Test;
import java.io.IOException;
+import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
/**
@@ -40,4 +42,10 @@
boolean hasSucceeded = NdnPingClient.pingLocal(face);
assertTrue(hasSucceeded);
}
+
+ @Test
+ public void testFailedPing() {
+ boolean hasSucceeded = NdnPingClient.ping(face, new Name("/non/existent/name/of/data"));
+ assertFalse(hasSucceeded);
+ }
}