public void testTestBox() throws Exception {
// Create simulated network of test servers.
HostEnvironment env = new HostEnvironment(true);
// Create new test box.
ITestBox box = new TestBox(15907);
// Connect box with other hosts.
final HostId routerId = env.host1.getHomeId();
box.connectToNetwork(routerId);
// Test server count.
final int testServerCount = box.getTestServerCount();
assertEquals(2, testServerCount);
// Shut down box and environment.
env.shutDown();
box.shutdown();
// Wait for ports to be freed.
OS.sleep(500);
}