@Test public void shouldDelegateGetLogWriter() throws Exception { PrintWriter writer = new PrintWriter(new ByteArrayOutputStream()); given(delegate.getLogWriter()).willReturn(writer); assertThat(dataSource.getLogWriter(), is(writer)); }
public PrintWriter getLogWriter() throws SQLException { return getTargetDataSource().getLogWriter(); }
DelegatingDataSource implements DataSource, InitializingBean { public PrintWriter getLogWriter() throws SQLException { return getTargetDataSource().getLogWriter(); } }
DelegatingDataSource implements DataSource, InitializingBean { public PrintWriter getLogWriter() throws SQLException { return getTargetDataSource().getLogWriter(); } DelegatingDataSource();  DelegatingDataSource(DataSource targetDataSource); }
DelegatingDataSource implements DataSource, InitializingBean { public PrintWriter getLogWriter() throws SQLException { return getTargetDataSource().getLogWriter(); } 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(); }
DelegatingDataSource implements DataSource, InitializingBean { public PrintWriter getLogWriter() throws SQLException { return getTargetDataSource().getLogWriter(); } 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();  }