### Question:
LocalTransactionDataSource implements DataSource { @Override public boolean isWrapperFor(Class<?> iface) throws SQLException { if (iface == null) { return false; } if (iface.isAssignableFrom(getClass())) { return true; } return dataSource.isWrapperFor(iface); } LocalTransactionDataSource(DataSource dataSource);  LocalTransactionDataSource(String url, String user, String password); @Override Connection getConnection(); @Override Connection getConnection(String username, String password); @Override int getLoginTimeout(); @Override PrintWriter getLogWriter(); @Override boolean isWrapperFor(Class<?> iface); @Override void setLoginTimeout(int seconds); @Override void setLogWriter(PrintWriter out); @SuppressWarnings("unchecked") @Override T unwrap(Class<T> iface); LocalTransaction getLocalTransaction(JdbcLogger jdbcLogger); LocalTransaction getLocalTransaction(
      JdbcLogger jdbcLogger, TransactionIsolationLevel transactionIsolationLevel); KeepAliveLocalTransaction getKeepAliveLocalTransaction(JdbcLogger jdbcLogger); KeepAliveLocalTransaction getKeepAliveLocalTransaction(
      JdbcLogger jdbcLogger, TransactionIsolationLevel transactionIsolationLevel); @Override Logger getParentLogger();  }### Answer:
@Test public void testIsWrapperFor() throws SQLException { DataSource dataSource = new LocalTransactionDataSource(new MockDataSource()); assertTrue(dataSource.isWrapperFor(LocalTransactionDataSource.class)); assertTrue(dataSource.isWrapperFor(MockDataSource.class)); assertFalse(dataSource.isWrapperFor(Runnable.class)); }