public void closeAllResources() {
        synchronized (this) {
            closed.set(true);
            closeHandlers(true);
            closeConnections(true);
        }
    }
@Test
    void assertCloseAllResourcesInTransaction() throws SQLException {
        connectionSession.getTransactionStatus().setInTransaction(true);
        Connection cachedConnection = prepareCachedConnections();
        databaseConnectionManager.closeAllResources();
        assertTrue(databaseConnectionManager.getClosed().get());
        verify(cachedConnection).rollback();
    }