Added unit test utilities and some more unit tests.
diff --git a/utils/junit/src/main/java/org/onlab/junit/TestTools.java b/utils/junit/src/main/java/org/onlab/junit/TestTools.java
new file mode 100644
index 0000000..959d5d9
--- /dev/null
+++ b/utils/junit/src/main/java/org/onlab/junit/TestTools.java
@@ -0,0 +1,93 @@
+package org.onlab.junit;
+
+import static com.google.common.base.Preconditions.checkArgument;
+import static org.junit.Assert.fail;
+
+/**
+ * Utilities to aid in producing JUnit tests.
+ */
+public final class TestTools {
+
+    // Prohibit construction
+    private TestTools() {
+    }
+
+    /**
+     * Suspends the current thread for a specified number of millis.
+     *
+     * @param ms number of millis
+     */
+    public static void delay(int ms) {
+        try {
+            Thread.sleep(ms);
+        } catch (InterruptedException e) {
+            fail("test interrupted");
+        }
+    }
+
+    /**
+     * Returns the current time in millis since epoch.
+     *
+     * @return current time
+     */
+    public static long now() {
+        return System.currentTimeMillis();
+    }
+
+    /**
+     * Runs the specified runnable until it completes successfully or until the
+     * specified time expires. If the latter occurs, the first encountered
+     * assertion on the last attempt will be re-thrown. Errors other than
+     * assertion errors will be propagated immediately.
+     * <p>
+     * Assertions attempts will not be closer than 10 millis apart and no
+     * further than 50 millis.
+     * </p>
+     *
+     * @param delay      number of millis to delay before the first attempt
+     * @param duration   number of milliseconds beyond the current time
+     * @param assertions test assertions runnable
+     */
+    public static void assertAfter(int delay, int duration, Runnable assertions) {
+        checkArgument(delay < duration, "delay >= duration");
+        long start = now();
+        int step = Math.max(Math.min((duration - delay) / 100, 50), 10);
+
+        // Is there an initial delay?
+        if (delay > 0) {
+            delay(delay);
+        }
+
+        // Keep going until the assertions succeed or until time runs-out.
+        while (true) {
+            try {
+                assertions.run();
+                break;
+            } catch (AssertionError e) {
+                // If there was an error and time ran out, re-throw it.
+                if (now() - start > duration) {
+                    throw e;
+                }
+            }
+            delay(step);
+        }
+    }
+
+    /**
+     * Runs the specified runnable until it completes successfully or until the
+     * specified time expires. If the latter occurs, the first encountered
+     * assertion on the last attempt will be re-thrown. Errors other than
+     * assertion errors will be propagated immediately.
+     * <p>
+     * Assertions attempts will not be closer than 10 millis apart and no
+     * further than 50 millis.
+     * </p>
+     *
+     * @param duration   number of milliseconds beyond the current time
+     * @param assertions test assertions runnable
+     */
+    public static void assertAfter(int duration, Runnable assertions) {
+        assertAfter(0, duration, assertions);
+    }
+
+}
diff --git a/utils/junit/src/main/javadoc/org/onlab/junit/package.html b/utils/junit/src/main/javadoc/org/onlab/junit/package.html
new file mode 100644
index 0000000..4e84cb9
--- /dev/null
+++ b/utils/junit/src/main/javadoc/org/onlab/junit/package.html
@@ -0,0 +1,3 @@
+<body>
+Utilities to assist in developing JUnit tests.
+</body>
\ No newline at end of file
diff --git a/utils/junit/src/test/java/org/onlab/junit/TestToolsTest.java b/utils/junit/src/test/java/org/onlab/junit/TestToolsTest.java
new file mode 100644
index 0000000..9afc913
--- /dev/null
+++ b/utils/junit/src/test/java/org/onlab/junit/TestToolsTest.java
@@ -0,0 +1,32 @@
+package org.onlab.junit;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+import static org.onlab.junit.TestTools.assertAfter;
+
+public class TestToolsTest {
+
+    @Test
+    public void testSuccess() {
+        assertAfter(10, 100, new Runnable() {
+            int count = 0;
+            @Override
+            public void run() {
+                if (count++ < 3) {
+                    assertTrue(false);
+                }
+            }
+        });
+    }
+
+    @Test(expected = AssertionError.class)
+    public void testFailure() {
+        assertAfter(100, new Runnable() {
+            @Override
+            public void run() {
+                assertTrue(false);
+            }
+        });
+    }
+}