EvalContextWithTask extends ForwardingEvalContext { @Override public Optional<Task<?>> currentTask() { return Optional.of(task); } private  EvalContextWithTask(EvalContext delegate, Task<?> task); @Override Optional<Task<?>> currentTask();  }
@Test public void testEmptyDefault() throws Exception { assertThat(EvalContext.sync().currentTask(), is(Optional.empty())); }
@Test public void testCurrentTaskId() throws Exception { assertThat(sut.currentTask(), is(Optional.of(task))); }