@Override
  public void execute(Context context) {
    editionProvider.get().ifPresent(edition -> {
      if (!edition.equals(EditionProvider.Edition.COMMUNITY)) {
        return;
      }

      Map<String, Integer> filesPerLanguage = reportReader.readMetadata().getNotAnalyzedFilesByLanguageMap()
        .entrySet()
        .stream()
        .filter(entry -> entry.getValue() > 0)
        .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));

      if (filesPerLanguage.isEmpty()) {
        return;
      }

      ceTaskMessages.add(constructMessage(filesPerLanguage));
      computeMeasures(filesPerLanguage);
    });
  }
@Test
  public void add_warning_and_measures_in_SQ_community_edition_if_there_are_c_or_cpp_files() {
    when(editionProvider.get()).thenReturn(Optional.of(EditionProvider.Edition.COMMUNITY));
    ScannerReport.AnalysisWarning warning1 = ScannerReport.AnalysisWarning.newBuilder().setText("warning 1").build();
    ScannerReport.AnalysisWarning warning2 = ScannerReport.AnalysisWarning.newBuilder().setText("warning 2").build();
    ImmutableList<ScannerReport.AnalysisWarning> warnings = of(warning1, warning2);
    reportReader.setAnalysisWarnings(warnings);
    reportReader.setMetadata(ScannerReport.Metadata.newBuilder()
      .putNotAnalyzedFilesByLanguage("C++", 20)
      .putNotAnalyzedFilesByLanguage("C", 10)
      .putNotAnalyzedFilesByLanguage("SomeLang", 1000)
      .build());

    underTest.execute(new TestComputationStepContext());

    verify(ceTaskMessages, times(1)).add(argumentCaptor.capture());
    assertThat(argumentCaptor.getAllValues())
      .extracting(Message::getText, Message::getType)
      .containsExactly(tuple(
        "10 unanalyzed C, 20 unanalyzed C++ and 1000 unanalyzed SomeLang files were detected in this project during the last analysis. C," +
          " C++ and SomeLang cannot be analyzed with your current SonarQube edition. Please consider" +
          " <a target=\"_blank\" href=\"https://www.sonarsource.com/plans-and-pricing/developer/?referrer=sonarqube-cpp\">upgrading to Developer Edition</a> to find Bugs," +
          " Code Smells, Vulnerabilities and Security Hotspots in these files.",
        MessageType.SUGGEST_DEVELOPER_EDITION_UPGRADE));
    assertThat(measureRepository.getAddedRawMeasure(PROJECT_REF, UNANALYZED_C_KEY).get().getIntValue()).isEqualTo(10);
    assertThat(measureRepository.getAddedRawMeasure(PROJECT_REF, UNANALYZED_CPP_KEY).get().getIntValue()).isEqualTo(20);
  }