### Question:
OngoingReturningMissionRun extends OngoingMissionRun { public ReturnHelper<R> returnOutput() { return new ReturnHelper<R>(new ReturnOutput()); } OngoingReturningMissionRun(Mole mole, Mono<MissionHandle> handle, Class<R> returnType); @Override OngoingReturningMissionRun<R> and(); R awaitOuputValue(); ReturnHelper<R> returnOutput();  }### Answer:
@Test public void returnOutput() { OngoingMissionRun.ReturnHelper<Boolean> resultReturnHelper = run.returnOutput(); assertNotNull(resultReturnHelper.whenFinished()); assertThat(resultReturnHelper.whenFinished(), instanceOf(Boolean.class)); assertEquals(TRUE, resultReturnHelper.whenFinished()); assertNotNull(resultReturnHelper.whenFinished(Duration.ofMillis(100))); assertThat(resultReturnHelper.whenFinished(Duration.ofMillis(100)), instanceOf(Boolean.class)); assertEquals(TRUE, resultReturnHelper.whenFinished(Duration.ofMillis(100))); assertNotNull(resultReturnHelper.when(runStateEquals(RunState.PAUSED).or(runStateEquals(RunState.FINISHED)))); assertThat(resultReturnHelper.when(runStateEquals(RunState.PAUSED).or(runStateEquals(RunState.FINISHED))), instanceOf(Boolean.class)); assertEquals(TRUE, resultReturnHelper.when(runStateEquals(RunState.PAUSED) .or(runStateEquals(RunState.FINISHED)))); assertNotNull(resultReturnHelper.when(runStateEquals(RunState.PAUSED).or(runStateEquals(RunState.FINISHED)), Duration.ofMillis(100))); assertThat(resultReturnHelper.when(runStateEquals(RunState.PAUSED).or(runStateEquals(RunState.FINISHED)), Duration.ofMillis(100)), instanceOf(Boolean.class)); assertEquals(TRUE, resultReturnHelper.when(runStateEquals(RunState.PAUSED) .or(runStateEquals(RunState.FINISHED)), Duration.ofMillis(100))); }