### Question:
DelegatingDataSource implements DataSource, InitializingBean { public boolean isWrapperFor(Class<?> iface) throws SQLException { return (iface.isInstance(this) || getTargetDataSource().isWrapperFor(iface)); } DelegatingDataSource();  DelegatingDataSource(DataSource targetDataSource); void setTargetDataSource(DataSource targetDataSource); DataSource getTargetDataSource(); void afterPropertiesSet(); Connection getConnection(); Connection getConnection(String username, String password); PrintWriter getLogWriter(); void setLogWriter(PrintWriter out); int getLoginTimeout(); void setLoginTimeout(int seconds); @SuppressWarnings("unchecked") T unwrap(Class<T> iface); boolean isWrapperFor(Class<?> iface); Logger getParentLogger();  }### Answer:
@Test public void shouldDelegateIsWrapperForWithoutImplementing() throws Exception { given(delegate.isWrapperFor(ExampleWrapper.class)).willReturn(true); assertThat(dataSource.isWrapperFor(ExampleWrapper.class), is(true)); }
@Test public void shouldDelegateIsWrapperForImplementing() throws Exception { dataSource = new DelegatingDataSourceWithWrapper(); assertThat(dataSource.isWrapperFor(ExampleWrapper.class), is(true)); }