@Test public void returnsEmptyBeforeStartWasCalled() throws Exception { final BackgroundRunner<String> instance = new BackgroundRunner<>( 0, Clock.systemUTC(), mock(ScheduledExecutorService.class) ); assertThat(instance.getMostRecentResult().isPresent(), is(false)); }
public Optional<E> getMostRecentResult() { return Optional.ofNullable(previousResult); }
BackgroundRunner { public Optional<E> getMostRecentResult() { return Optional.ofNullable(previousResult); } }
BackgroundRunner { public Optional<E> getMostRecentResult() { return Optional.ofNullable(previousResult); } BackgroundRunner(int hourToRunAt, Clock clock, ScheduledExecutorService healthchecksExecutor); }
BackgroundRunner { public Optional<E> getMostRecentResult() { return Optional.ofNullable(previousResult); } BackgroundRunner(int hourToRunAt, Clock clock, ScheduledExecutorService healthchecksExecutor); void start(Producer<E> task); Optional<E> getMostRecentResult(); }
BackgroundRunner { public Optional<E> getMostRecentResult() { return Optional.ofNullable(previousResult); } BackgroundRunner(int hourToRunAt, Clock clock, ScheduledExecutorService healthchecksExecutor); void start(Producer<E> task); Optional<E> getMostRecentResult();  }