### Question:
Jdbi implements Configurable<Jdbi> { public <R, X extends Exception> R withHandle(HandleCallback<R, X> callback) throws X { if (threadHandleSupplier.get() != null) { return callback.withHandle(threadHandleSupplier.get().getHandle()); } try (Handle h = this.open()) { threadHandleSupplier.set(new ConstantHandleSupplier(h)); return callback.withHandle(h); } finally { threadHandleSupplier.remove(); } } private  Jdbi(ConnectionFactory connectionFactory); static Jdbi create(Connection connection); static Jdbi create(DataSource dataSource); static Jdbi create(ConnectionFactory connectionFactory); static Jdbi create(final String url); static Jdbi create(final String url, final Properties properties); static Jdbi create(final String url, final String username, final String password); static Handle open(DataSource dataSource); static Handle open(ConnectionFactory connectionFactory); static Handle open(final Connection connection); static Handle open(final String url); static Handle open(final String url, final String username, final String password); static Handle open(final String url, final Properties props); Jdbi installPlugins(); Jdbi installPlugin(JdbiPlugin plugin); Jdbi setStatementBuilderFactory(StatementBuilderFactory factory); StatementBuilderFactory getStatementBuilderFactory(); @Override ConfigRegistry getConfig(); Jdbi setTransactionHandler(TransactionHandler handler); TransactionHandler getTransactionHandler(); Handle open(); R withHandle(HandleCallback<R, X> callback); void useHandle(final HandleConsumer<X> consumer); R inTransaction(final HandleCallback<R, X> callback); void useTransaction(final HandleConsumer<X> callback); R inTransaction(final TransactionIsolationLevel level, final HandleCallback<R, X> callback); void useTransaction(final TransactionIsolationLevel level, final HandleConsumer<X> callback); R withExtension(Class<E> extensionType, ExtensionCallback<R, E, X> callback); void useExtension(Class<E> extensionType, ExtensionConsumer<E, X> callback); E onDemand(Class<E> extensionType);  }### Answer:
@Test public void testWithHandle() { Jdbi db = Jdbi.create(this.dbRule.getConnectionString()); String value = db.withHandle(handle -> { handle.execute("insert into something (id, name) values (1, 'Brian')"); return handle.createQuery("select name from something where id = 1").mapToBean(Something.class).one().getName(); }); assertThat(value).isEqualTo("Brian"); }