// the first "cast part" is not important, we just want to check the jdbc url is ok
assertThat(ds, instanceOf(BasicManagedDataSource.class));
final BasicManagedDataSource dbcp = (BasicManagedDataSource) ds;
final Connection connection = dbcp.getConnection();
assertThat(connection, instanceOf(ManagedConnection.class));
final ManagedConnection mc = (ManagedConnection) connection;
final Method getInnermostDelegateInternal = DelegatingConnection.class.getDeclaredMethod("getInnermostDelegateInternal");
getInnermostDelegateInternal.setAccessible(true);
final Connection delegate = (Connection) getInnermostDelegateInternal.invoke(mc);
assertThat(delegate, instanceOf(JDBCConnection.class));
final Method getURL = JDBCConnection.class.getDeclaredMethod("getURL");