@Test public void shouldDelegateSetLogWriter() throws Exception { PrintWriter writer = new PrintWriter(new ByteArrayOutputStream()); dataSource.setLogWriter(writer); verify(delegate).setLogWriter(writer); }
public void setLogWriter(PrintWriter out) throws SQLException { getTargetDataSource().setLogWriter(out); }
DelegatingDataSource implements DataSource, InitializingBean { public void setLogWriter(PrintWriter out) throws SQLException { getTargetDataSource().setLogWriter(out); } }
DelegatingDataSource implements DataSource, InitializingBean { public void setLogWriter(PrintWriter out) throws SQLException { getTargetDataSource().setLogWriter(out); } DelegatingDataSource();  DelegatingDataSource(DataSource targetDataSource); }
DelegatingDataSource implements DataSource, InitializingBean { public void setLogWriter(PrintWriter out) throws SQLException { getTargetDataSource().setLogWriter(out); } 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 void setLogWriter(PrintWriter out) throws SQLException { getTargetDataSource().setLogWriter(out); } 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();  }