}
@Test
public void testCallBatchTasksAutoCommitTrueThrow() throws Exception {
TableInfo<Foo, String> tableInfo = new TableInfo<Foo, String>(connectionSource, null, Foo.class);
DatabaseConnection connection = createMock(DatabaseConnection.class);
expect(connection.isAutoCommitSupported()).andReturn(true);
expect(connection.getAutoCommit()).andReturn(true);
connection.setAutoCommit(false);
connection.setAutoCommit(true);
StatementExecutor<Foo, String> statementExec =
new StatementExecutor<Foo, String>(databaseType, tableInfo, null);
replay(connection);
try {
statementExec.callBatchTasks(connection, false, new Callable<Void>() {