@Test
	public void testCurrentRunningTimeOverDuration() {
		SingleConsole singleConsole = new SingleConsole(getFreePort()) {

			public long getCurrentRunningTime() {
				return new Date().getTime() - current.getTime();
			}
		};
		ThreadUtils.sleep(200);
		assertThat(singleConsole.isCurrentRunningTimeOverDuration(1000), is(false));
		ThreadUtils.sleep(800);
		assertThat(singleConsole.isCurrentRunningTimeOverDuration(1000), is(true));
	}
Returns a free port number on localhost, or -1 if unable to find a free port.

@return a free port number on localhost, or -1 if unable to find a free port
ngrinder-core/src/test/java/net/grinder/SingleConsoleTest.java