static public void waitOn(Object o) {
	// System.out.println("About to wait on " + System.identityHashCode(o));
	MultithreadedTestCase thisTestCase = currentTestCase.get();
	if (thisTestCase != null && thisTestCase.failed)
	    throw new RuntimeException("Test case has failed");
	if (skipNextWait.get()) {
	    skipNextWait.set(false);
	    return;
	}
	try {
	    o.wait(3000);
	} catch (InterruptedException e) {
	    throw new AssertionError(e);
	} catch (IllegalMonitorStateException e) {
	    System.out.println("Got illegal monitor state exception");
	}
	if (thisTestCase != null && thisTestCase.failed)
	    throw new RuntimeException("Test case has failed");
	// System.out.println("waited on " + System.identityHashCode(o));
    }