BatchIsolatedLauncher implements IsolatedLauncher { @Override public void execute(Map<String, String> properties, org.sonarsource.scanner.api.internal.batch.LogOutput logOutput) { factory.createBatch(properties, logOutput).execute(); } BatchIsolatedLauncher();  BatchIsolatedLauncher(BatchFactory factory); @Override void execute(Map<String, String> properties, org.sonarsource.scanner.api.internal.batch.LogOutput logOutput); @Override String getVersion();  }
@Test public void proxy() { when(factory.createBatch(any(Map.class), any(org.sonarsource.scanner.api.internal.batch.LogOutput.class))).thenReturn(batch); HashMap<String, String> prop = new HashMap<>(); launcher.execute(prop, (m, l) -> { }); verify(factory).createBatch(any(Map.class), any(org.sonarsource.scanner.api.internal.batch.LogOutput.class)); verify(batch).execute(); verifyNoMoreInteractions(batch); verifyNoMoreInteractions(factory); }