@Test
    void testStatementStreamCallbackCleanup() {
        final Jdbi jdbi = h2Extension.getJdbi();

        Optional<String> userName = jdbi.withHandle(h ->
                h.createQuery("SELECT name from users")
                        .mapTo(String.class)
                        .stream().findFirst());

        assertThat(userName).isPresent();
    }
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