### Question:
DatabaseManager { protected static void rollback(Connection connection) { if (connection != null) { try { connection.rollback(); } catch (SQLException e) { LOGGER.error("Error while rollback: {}", e); } } } protected  DatabaseManager(DataSource dataSource); final boolean entryExists(String sql, List<?> args); final boolean entryExists(String sql, Object... args); final int runBatchInsert(String sql, BatchDataProvider provider); final long runBatchInsertLongId(String sql, BatchDataProvider provider); final int[] runBatchInsertReturnIds(String sql, final List<List<Object>> batchArgs); final long[] runBatchInsertReturnLongIds(String sql, final List<List<Object>> batchArgs); final int[] runBatchUpdate(String sql, BatchDataProvider provider); final int[] runBatchUpdate(String sql, final List<List<Object>> batchArgs); final Integer runAggregateQuery(String sql); final int runInsertReturnId(String sql, List<?> args); final int runInsertReturnId(String sql, Object... args); final int runInsertReturnId(Connection connection, String sql, Object... args); final int runInsertReturnId(Query query); long runInsertReturnLongId(String sql, Object... args); final int runInsertReturnId(Connection connection, Query query); @Deprecated final Object[] runOneResultLineQuery(String query, final int entries, Object... args); final int runQuery(ResultCallback<T> callback, RowConverter<T> converter, String sql, Object... args); final int runQuery(ResultCallback<T> callback, RowConverter<T> converter, Query query); final int runQuery(ResultSetCallback callback, String sql, Object... args); final int runQuery(ResultSetCallback callback, Query query); final List<T> runQuery(RowConverter<T> converter, String sql, List<?> args); final List<T> runQuery(RowConverter<T> converter, String sql, Object... args); final List<T> runQuery(RowConverter<T> converter, Query query); final Set<T> runDistinctQuery(RowConverter<T> converter, String sql, Object... args); final Set<T> runDistinctQuery(RowConverter<T> converter, Query query); final ResultIterator<T> runQueryWithIterator(RowConverter<T> converter, String sql, List<?> args); final ResultIterator<T> runQueryWithIterator(RowConverter<T> converter, String sql, Object... args); final ResultIterator<T> runQueryWithIterator(RowConverter<T> converter, Query query); final T runSingleQuery(RowConverter<T> converter, String sql, List<?> args); final T runSingleQuery(RowConverter<T> converter, String sql, Object... args); @SuppressWarnings("unchecked") final T runSingleQuery(RowConverter<T> converter, Query query); final int runUpdate(String sql, List<?> args); final int runUpdate(String sql, Object... args); final int runUpdate(Connection connection, String sql, List<?> args); final int runUpdate(Connection connection, String sql, Object... args); final int runUpdate(Query query); final int runUpdate(Connection connection, Query query); final int runUpdate(ResultSetCallback callback, String sql); StringBuilder getLastError();  }### Answer:
@Test public void testRollback() { final List<SampleClazz> test = Arrays.asList(c1, c2, c3, c1); int insertedRows = databaseManager.runBatchInsert(INSERT_TEST_2, new CollectionBatchDataProvider<SampleClazz>( test) { @Override public void insertedItemLongId(int number, long generatedId) { } @Override public List<? extends Object> getData(SampleClazz nextItem) { List<Object> data = new ArrayList<>(); data.add(nextItem.getName()); data.add(nextItem.getAge()); data.add(nextItem.getWeight()); data.add(nextItem.isCool()); return data; } }); assertEquals(0, insertedRows); assertEquals(0, (int)databaseManager.runSingleQuery(RowConverters.INTEGER, "SELECT COUNT(*) FROM test2;")); }