### Question:
DatabaseConnectionProxy implements DatabaseConnection { @Override public boolean isAutoCommit() throws SQLException { if (proxy == null) { return false; } else { return proxy.isAutoCommit(); } } DatabaseConnectionProxy(DatabaseConnection proxy); @Override boolean isAutoCommitSupported(); @Override boolean isAutoCommit(); @Override void setAutoCommit(boolean autoCommit); @Override Savepoint setSavePoint(String name); @Override void commit(Savepoint savePoint); @Override void rollback(Savepoint savePoint); @Override int executeStatement(String statementStr, int resultFlags); @Override CompiledStatement compileStatement(String statement, StatementType type, FieldType[] argFieldTypes,
			int resultFlags, boolean cacheStore); @Override int insert(String statement, Object[] args, FieldType[] argfieldTypes, GeneratedKeyHolder keyHolder); @Override int update(String statement, Object[] args, FieldType[] argfieldTypes); @Override int delete(String statement, Object[] args, FieldType[] argfieldTypes); @Override Object queryForOne(String statement, Object[] args, FieldType[] argfieldTypes,
			GenericRowMapper<T> rowMapper, ObjectCache objectCache); @Override long queryForLong(String statement); @Override long queryForLong(String statement, Object[] args, FieldType[] argFieldTypes); @Override void close(); @Override void closeQuietly(); @Override boolean isClosed(); @Override boolean isTableExists(String tableName);  }### Answer:
@Test public void testIsAutoCommit() throws Exception { DatabaseConnection conn = createMock(DatabaseConnection.class); boolean autoCommit = false; expect(conn.isAutoCommit()).andReturn(autoCommit); conn.close(); DatabaseConnectionProxy proxy = new DatabaseConnectionProxy(conn); replay(conn); assertEquals(autoCommit, proxy.isAutoCommit()); proxy.close(); verify(conn); }