@Test
public void continueOnErrorDuringCommit() {

    doThrow(new IllegalStateException("Exception during commit")).when(store).commitTransaction();
    configuration.setContinueOnError(true);
    Scanner scanner = new ScannerImpl(configuration, emptyMap(), context, scannerPluginRepository);
    scanner.scan("test1", "test1", scope);
    scanner.scan("test2", "test2", scope);
    verify(store, times(2)).beginTransaction();
    verify(store, times(2)).commitTransaction();
    verify(store, times(2)).rollbackTransaction();
}