FailoverDataSource implements DataSource { @Override public <T> T unwrap(Class<T> iface) throws SQLException { throw new SQLException("Nothing to unwrap"); } private  FailoverDataSource();  FailoverDataSource(Properties p); @Override Connection getConnection(); @Override Connection getConnection(String username, String password); @Override void setLoginTimeout(int loginTimeout); @Override int getLoginTimeout(); @Override void setLogWriter(PrintWriter logWriter); @Override PrintWriter getLogWriter(); @Override boolean isWrapperFor(Class<?> iface); @Override T unwrap(Class<T> iface); @Override java.util.logging.Logger getParentLogger(); static final String POOL_MAX_SIZE; static final String POOL_TIME_TO_WAIT; }
@Test(expected = SQLException.class) public void testUnwrap() throws Exception { FailoverDataSource fds = new FailoverDataSource(createProperties()); assertFalse(fds.isWrapperFor(Connection.class)); fds.unwrap(Connection.class); }