@Override
  public void setResult(CeTaskResult taskResult) {
    requireNonNull(taskResult, "taskResult can not be null");
    checkState(this.result == null, "CeTaskResult has already been set in the holder");
    this.result = taskResult;
  }
@Test
  public void setResult_throws_ISE_if_called_twice() {
    underTest.setResult(mock(CeTaskResult.class));

    assertThatThrownBy(() -> underTest.setResult(mock(CeTaskResult.class)))
      .isInstanceOf(IllegalStateException.class)
      .hasMessage("CeTaskResult has already been set in the holder");
  }