@Test
    void verifyOperation() {
        val props = new Jpa()
            .setDriverClass("org.hsqldb.jdbcDriver")
            .setUser("sa")
            .setUrl("jdbc:hsqldb:mem:cas");

        val ds = JpaBeans.newDataSource(props);
        assertInstanceOf(Closeable.class, ds.getTargetDataSource());
        assertDoesNotThrow(() -> {
            ds.close();
            ds.destroy();
        });
    }
This is {@link DefaultCloseableDataSourceTests}.

@author Misagh Moayyed
@since 6.4.0
support/cas-server-support-jpa-util/src/test/java/org/apereo/cas/configuration/support/DefaultCloseableDataSourceTests.java