TelemetryLogger { public void logErrorForProject(Exception e) { uploadLogs(buildResultLog(ImmutableList.of(), e).setArtifactType(ArtifactType.PROJECT_DIR)); } @VisibleForTesting  TelemetryLogger(Clock clock, Preferences preferences, URLStreamHandler urlStreamHandler); static TelemetryLogger get(); void logResultsForProject(ImmutableList<Suggestion> suggestions); void logErrorForProject(Exception e); void logResultsForBundle(
      File bundleFile, ImmutableList<Suggestion> suggestions); void logErrorForBundle(Exception e);  }
@Test public void logErrorForProject() throws Exception { telemetryLogger.logErrorForProject(new NullPointerException()); LogRequest logRequest = inflatePayload(clearcutConnection); assertCommonLogFields(logRequest); SizeAnalysisLog sizeAnalysisLog = extractSourceExtension(logRequest); assertThat(sizeAnalysisLog.getErrorType()).isEqualTo(ErrorType.RUNTIME_ERROR); }