@Test(expected = IllegalArgumentException.class) public void delegateIsRequired() throws Exception { ExtendedConnectionDataSourceProxy tested = new ExtendedConnectionDataSourceProxy(null); tested.afterPropertiesSet(); }