public Component buildProject(ScannerReport.Component project, String scmBasePath) {
    this.rootComponent = project;
    this.scmBasePath = trimToNull(scmBasePath);

    Node root = createProjectHierarchy(project);
    return buildComponent(root, "", "");
  }
@Test
  void project_name_is_loaded_from_report_if_present_and_on_main_branch() {
    String reportName = randomAlphabetic(5);
    ScannerReport.Component reportProject = newBuilder()
      .setType(PROJECT)
      .setName(reportName)
      .build();

    Component root = newUnderTest(SOME_PROJECT_ATTRIBUTES, true).buildProject(reportProject, NO_SCM_BASE_PATH);

    assertThat(root.getName()).isEqualTo(reportName);
  }