@Override
  public MutableAnalysisMetadataHolder setNewCodeReferenceBranch(String newCodeReferenceBranch) {
    checkState(!this.newCodeReferenceBranch.isInitialized(), "newCodeReferenceBranch has already been set");
    requireNonNull(newCodeReferenceBranch, "newCodeReferenceBranch can't be null");
    this.newCodeReferenceBranch.setProperty(newCodeReferenceBranch);
    return this;
  }
@Test
  public void set_new_code_reference_branch_throws_ISE_when_called_twice() {

    String newCodeReferenceBranch = "newCodeReferenceBranch";
    underTest.setNewCodeReferenceBranch(newCodeReferenceBranch);

    assertThatThrownBy(() -> underTest.setNewCodeReferenceBranch(newCodeReferenceBranch))
      .isInstanceOf(IllegalStateException.class)
      .hasMessage("newCodeReferenceBranch has already been set");
  }