@Test
public void testWaitFromOne() {

	try {
		SuperstepKickoffLatch latch = new SuperstepKickoffLatch();
		
		Waiter w = new Waiter(latch, 2);
		Thread waiter = new Thread(w);
		waiter.setDaemon(true);
		waiter.start();
		
		WatchDog wd = new WatchDog(waiter, 2000);
		wd.start();
		
		Thread.sleep(100);
		
		latch.triggerNextSuperstep();
		
		wd.join();
		if (wd.getError() != null) {
			throw wd.getError();
		}
		
		if (w.getError() != null) {
			throw w.getError();
		}
	}
	catch (Throwable t) {
		t.printStackTrace();
		Assert.fail("Error: " + t.getMessage());
	}
}