public static Handle createHandle() throws SQLException {
        Connection fakeConnection = mock(Connection.class);

        Jdbi fakeJdbi = Jdbi.create(() -> {
            throw new UnsupportedOperationException();
        });

        return Handle.createHandle(fakeJdbi, fakeConnection::close, new LocalTransactionHandler(),
            new DefaultStatementBuilder(), fakeConnection);
    }
Create a handle with a fake connection, useful for tests that do not actually hit a database.
core/src/test/java/org/jdbi/v3/core/HandleAccess.java