@Override
  public void setEvaluation(EvaluatedQualityGate g) {
    // fail fast
    requireNonNull(g);
    checkState(evaluation == null, "QualityGateHolder evaluation can be initialized only once");

    this.evaluation = g;
  }
@Test
  public void setEvaluation_throws_ISE_if_called_twice() {
    assertThatThrownBy(() -> {
      QualityGateHolderImpl holder = new QualityGateHolderImpl();

      EvaluatedQualityGate evaluation = mock(EvaluatedQualityGate.class);
      holder.setEvaluation(evaluation);
      holder.setEvaluation(evaluation);
    })
      .isInstanceOf(IllegalStateException.class);
  }