### Question:
DelegatingDataSource implements DataSource, InitializingBean { public int getLoginTimeout() throws SQLException { return getTargetDataSource().getLoginTimeout(); } 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 shouldDelegateGetLoginTimeout() throws Exception { int timeout = 123; given(delegate.getLoginTimeout()).willReturn(timeout); assertThat(dataSource.getLoginTimeout(), is(timeout)); }