JdbcDependencyManager { public void updateValidationStatuses(final Map<Dependency, FileValidationStatus> depValidationStatuses, final String validationKey) throws SQLException { if (depValidationStatuses.isEmpty()) { return; } Object[][] rowsToInsert = depValidationStatuses .keySet() .stream() .map(d -> new Object[]{d.getFileName(), d.getSHA1(), validationKey, depValidationStatuses.get(d).getValue()}) .toArray(Object[][]::new); this.dbOperator.batch("INSERT IGNORE INTO validated_dependencies " + "(file_name, file_sha1, validation_key, validation_status) VALUES (?, ?, ?, ?)", rowsToInsert); } @Inject  JdbcDependencyManager(final DatabaseOperator dbOperator); Map<Dependency, FileValidationStatus> getValidationStatuses(final Set<Dependency> deps,
      final String validationKey); void updateValidationStatuses(final Map<Dependency, FileValidationStatus> depValidationStatuses,
      final String validationKey);  }
@Test public void testEmptyUpdateValidationStatuses() throws Exception { this.jdbcDependencyManager.updateValidationStatuses(new HashMap(), VALIDATION_KEY); verify(this.dbOperator, never()).batch(anyString(), any()); }