@Override
    public void handleCreated(Handle handle) {
        requireNonNull(handle, "handle is null");

        assertFalse(handleTracker.objectAdded.containsKey(handle),
            () -> format("handle %s has already been added by thread %s", handle, handleTracker.objectAdded.get(handle))
        );
        assertFalse(handleTracker.objectRemoved.containsKey(handle),
            () -> format("handle %s has already been removed by thread %s", handle, handleTracker.objectRemoved.get(handle))
        );

        handleTracker.objectAdded.putIfAbsent(handle, getThreadName());
    }
A simple leak checker that tracks statement context and cleanable resource management.
testing/src/main/java/org/jdbi/v3/testing/junit5/internal/JdbiLeakChecker.java