}
@Test
public void testTransactionManagerAutoCommitOn() throws Exception {
ConnectionSource connectionSource = createMock(ConnectionSource.class);
DatabaseConnection conn = createMock(DatabaseConnection.class);
expect(conn.isAutoCommitSupported()).andReturn(true);
expect(conn.getAutoCommit()).andReturn(true);
conn.setAutoCommit(false);
Savepoint savePoint = createMock(Savepoint.class);
expect(savePoint.getSavepointName()).andReturn("name").anyTimes();
expect(conn.setSavePoint(isA(String.class))).andReturn(savePoint);
conn.commit(savePoint);
conn.setAutoCommit(true);
expect(connectionSource.getDatabaseType()).andReturn(databaseType);
expect(connectionSource.getReadWriteConnection()).andReturn(conn);
expect(connectionSource.saveSpecialConnection(conn)).andReturn(true);
connectionSource.clearSpecialConnection(conn);
connectionSource.releaseConnection(conn);