@Test
    void testUnmanagedHandleExplodingStatemenCleanupBySetting() {
        h2Extension.getJdbi().getConfig(SqlStatements.class).setAttachAllStatementsForCleanup(true);

        assertThatExceptionOfType(UnableToExecuteStatementException.class).isThrownBy(() -> {
            try (Handle handle = h2Extension.openHandle()) {
                handle.createQuery("SELECT name from users")
                        .setFetchSize(-1)
                        .mapTo(String.class)
                        .list();
            }
        });
    }
Many tests that try to provoke leaks and see whether the various checkers find them and various cleanup strategies catch them.
core/src/test/java/org/jdbi/v3/core/statement/LeakTest.java