@Test public void shouldWaitForApplicationToStart() { // Given int timeout = 1234; task.setTimeout(timeout); // When task.exec(); // Then verify(poller).awaitAtMost(eq(timeout), eq(TimeUnit.SECONDS), any(Callable.class)); }
@Test public void shouldSetAndReturnTimeout() { // Given int timeout = 123456; // When task.setTimeout(timeout); int result = task.getTimeout(); // Then assertThat(result).isEqualTo(timeout); }