@CheckForNull
  public String get() {
    // branches will be empty in CE
    if (branchConfiguration.isPullRequest() || branches.isEmpty()) {
      return null;
    }

    return Optional.ofNullable(getFromProperties()).orElseGet(this::loadWs);
  }
@Test
  public void get_uses_default_branch_if_no_branch_specified() {
    when(branchConfiguration.branchType()).thenReturn(BranchType.BRANCH);
    when(branchConfiguration.branchName()).thenReturn(null);
    when(projectBranches.defaultBranchName()).thenReturn("default");
    when(newCodePeriodLoader.load(PROJECT_KEY, "default")).thenReturn(createResponse(NewCodePeriods.NewCodePeriodType.REFERENCE_BRANCH, "main"));

    assertThat(referenceBranchSupplier.get()).isEqualTo("main");
  }