### Question:
TracingDataSource implements DataSource { @Override public Connection getConnection() throws SQLException { return new TracingConnection(delegate.getConnection()); } TracingDataSource(DataSource dataSource); static DataSource decorate(DataSource dataSource); @Override Connection getConnection(); @Override Connection getConnection(String username, String password); @Override @SuppressWarnings("unchecked") T unwrap(Class<T> iface); @Override boolean isWrapperFor(Class<?> iface); @Override PrintWriter getLogWriter(); @Override void setLogWriter(PrintWriter out); @Override void setLoginTimeout(int seconds); @Override int getLoginTimeout(); @Override Logger getParentLogger();  }### Answer:
@Test void testGetConnection() throws Exception { Assertions.assertTrue(dataSource.getConnection() instanceof TracingConnection); verify(delegate).getConnection(); Assertions.assertTrue(dataSource.getConnection("foo", "bar") instanceof TracingConnection); verify(delegate).getConnection("foo", "bar"); }