### Question:
TracingDataSource implements DataSource { @Override public boolean isWrapperFor(Class<?> iface) throws SQLException { return (iface.isInstance(this) || delegate.isWrapperFor(iface)); } 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 testDecoration() throws SQLException { Assertions.assertTrue(dataSource instanceof TracingDataSource); Assertions.assertTrue(dataSource.isWrapperFor(DataSource.class)); Assertions.assertTrue(dataSource.isWrapperFor(TracingDataSource.class)); Assertions.assertTrue(dataSource.isWrapperFor(OtherWrapper.class)); Assertions.assertTrue(dataSource.isWrapperFor(ExtraInterface.class)); Assertions.assertFalse(dataSource.isWrapperFor(Long.class)); verify(delegate, never()).isWrapperFor(DataSource.class); verify(delegate, never()).isWrapperFor(TracingDataSource.class); verify(delegate).isWrapperFor(OtherWrapper.class); verify(delegate).isWrapperFor(ExtraInterface.class); verify(delegate).isWrapperFor(Long.class); }