@Test
    void testStatementManagedStream() {
        try (Handle h = h2Extension.openHandle()) {
            try (Query query = h.createQuery("SELECT name from users")) {
                Optional<String> userName = query
                        .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