@Test public void testGetSetConnection() { ExpectProxy<Connection> tp = new ExpectProxy<Connection>(); final Connection xc = tp.getProxy(Connection.class); DatabaseConnection dbc = new DatabaseConnection(xc); dbc.getConnection(); assertTrue("close called", tp.isDone()); assertNotNull(dbc.getConnection()); assertSame("connection", xc, dbc.getConnection()); assertTrue("test called", tp.isDone()); }
public Connection getConnection() { return this.nativeConn; }
DatabaseConnection { public Connection getConnection() { return this.nativeConn; } }
DatabaseConnection { public Connection getConnection() { return this.nativeConn; } DatabaseConnection();  DatabaseConnection(final Connection conn); }
DatabaseConnection { public Connection getConnection() { return this.nativeConn; } DatabaseConnection();  DatabaseConnection(final Connection conn); @SuppressWarnings("deprecation") void dispose(); void test(); Connection getConnection(); void setConnection(final Connection connection); PreparedStatement prepareStatement(final String sql, final List<SQLParam> params); PreparedStatement prepareStatement(DatabaseQueryBuilder query); CallableStatement prepareCall(final String sql, final List<SQLParam> params); void commit(); }
DatabaseConnection { public Connection getConnection() { return this.nativeConn; } DatabaseConnection();  DatabaseConnection(final Connection conn); @SuppressWarnings("deprecation") void dispose(); void test(); Connection getConnection(); void setConnection(final Connection connection); PreparedStatement prepareStatement(final String sql, final List<SQLParam> params); PreparedStatement prepareStatement(DatabaseQueryBuilder query); CallableStatement prepareCall(final String sql, final List<SQLParam> params); void commit();  }