ComponentKey createComponentKey(String projectKey, Map<String, String> characteristics) {
    boolean containsBranchCharacteristics = characteristics.keySet().stream().anyMatch(BRANCH_CHARACTERISTICS::contains);
    if (containsBranchCharacteristics) {
      checkState(delegate != null, "Current edition does not support branch feature");
      return delegate.createComponentKey(projectKey, characteristics);
    }
    return new ComponentKeyImpl(projectKey);
  }
@Test
  public void createComponentKey_of_main_branch() {
    String projectKey = randomAlphanumeric(12);

    ComponentKey componentKey = underTestNoBranch.createComponentKey(projectKey, NO_CHARACTERISTICS);

    assertThat(componentKey).isEqualTo(underTestWithBranch.createComponentKey(projectKey, NO_CHARACTERISTICS));
    assertThat(componentKey.getKey()).isEqualTo(projectKey);
    assertThat(componentKey.getBranchName()).isEmpty();
    assertThat(componentKey.getPullRequestKey()).isEmpty();
    verifyNoInteractions(branchSupportDelegate);
  }