@Test
public void logResultsForProject() throws Exception {

  ImmutableList<Suggestion> suggestions = ImmutableList.of(
      Suggestion.create(
          IssueType.QUESTIONABLE_FILE,
          Category.LARGE_FILES,
          SOME_PAYLOAD,
          SOME_MESSAGE,
          1000L,
          /* autoFix= */ null),
      Suggestion.create(
          IssueType.QUESTIONABLE_FILE,
          Category.LARGE_FILES,
          SOME_PAYLOAD,
          SOME_MESSAGE,
          1000L,
          /* autoFix= */ null),
      Suggestion.create(
          IssueType.LARGE_FILES_DYNAMIC_FEATURE,
          Category.LARGE_FILES,
          SOME_PAYLOAD,
          SOME_MESSAGE,
          5000L,
          /* autoFix= */ null));
  telemetryLogger.logResultsForProject(suggestions);
  assertThat(clearcutConnection.getHeadersSetByClient().get("Cookie")).contains("NID=");
  LogRequest logRequest = inflatePayload(clearcutConnection);
  assertCommonLogFields(logRequest);
  SizeAnalysisLog sizeAnalysisLog = extractSourceExtension(logRequest);
  assertThat(sizeAnalysisLog.getAnalyzerVersion()).isEqualTo(Version.CURRENT_VERSION);
  assertThat(sizeAnalysisLog.getArtifactType()).isEqualTo(ArtifactType.PROJECT_DIR);
  assertThat(sizeAnalysisLog.getErrorType()).isEqualTo(ErrorType.NO_ERROR);
  assertThat(sizeAnalysisLog.getSuggestionsByIssueTypeList())
      .containsExactly(
          SuggestionsByIssueType.newBuilder()
              .setCategory("LARGE_FILES")
              .setIssueType("QUESTIONABLE_FILE")
              .setSuggestionCount(2)
              .setEstimatedSavingsBytes(2000)
              .build(),
          SuggestionsByIssueType.newBuilder()
              .setCategory("LARGE_FILES")
              .setIssueType("LARGE_FILES_DYNAMIC_FEATURE")
              .setSuggestionCount(1)
              .setEstimatedSavingsBytes(5000)
              .build());
  assertThat(sizeAnalysisLog.hasBundleSizeBreakdown()).isFalse();
}