public ProjectMeasuresStatistics searchSupportStatistics() {
    SearchRequest projectMeasuresSearchRequest = buildProjectMeasureSearchRequest();
    SearchResponse projectMeasures = client.search(projectMeasuresSearchRequest);
    return buildProjectMeasuresStatistics(projectMeasures);
  }
@Test
  public void search_statistics_should_count_0_if_no_projects() {
    es.putDocuments(TYPE_PROJECT_MEASURES,
      // insert applications
      newDoc(ComponentTesting.newApplication(), "lines", 1000, "coverage", 70)
        .setLanguages(Arrays.asList("java", "python", "kotlin"))
        .setNclocLanguageDistributionFromMap(ImmutableMap.of("java", 300, "python", 100, "kotlin", 404)),
      newDoc(ComponentTesting.newApplication(), "lines", 20, "coverage", 80)
        .setLanguages(Arrays.asList("java", "python", "kotlin"))
        .setNclocLanguageDistributionFromMap(ImmutableMap.of("java", 300, "python", 100, "kotlin", 404)));

    ProjectMeasuresStatistics result = underTest.searchSupportStatistics();

    assertThat(result.getProjectCount()).isZero();
    assertThat(result.getProjectCountByLanguage()).isEmpty();
  }