@Test
public void errorAnalysis() throws IOException {

  Exception e = createException("invalid operation", "analysis failed");
  doThrow(e).when(sonarLint).runAnalysis(anyMapOf(String.class, String.class), eq(fileFinder), any(Path.class));
  assertThat(main.run()).isEqualTo(Main.ERROR);
  assertThat(getLogs(err)).contains("invalid operation");
}