### Question:
JdbcSessions extends DBSessions { @NotNull public static DBLeasedSession wrap(@NotNull final Connection connection, @NotNull final JdbcIntermediateRdbmsProvider rdbmsProvider, final boolean takeOwnership) { final JdbcIntermediateSession intermediateSession = rdbmsProvider.wrapConnection(connection, takeOwnership); return wrap(intermediateSession); }  @NotNull static DBLeasedSession wrap(@NotNull final Connection connection,
                                     @NotNull final JdbcIntermediateRdbmsProvider rdbmsProvider,
                                     final boolean takeOwnership); @NotNull static DBLeasedSession wrap(@NotNull final Connection connection,
                                     @NotNull final JdbcIntermediateFederatedProvider federatedProvider,
                                     @NotNull final Rdbms rdbms,
                                     final boolean takeOwnership);  }### Answer:
@Test public void wrap_connection_not_own() throws SQLException { final Connection connection = obtainConnection(); assertThat(connection.isClosed()).isFalse(); final DBLeasedSession session = JdbcSessions.wrap(connection, provider, false); assertThat(session.isClosed()).isFalse(); session.close(); assertThat(session.isClosed()).isTrue(); assertThat(connection.isClosed()).isFalse(); connection.close(); assertThat(connection.isClosed()).isTrue(); }
@Test public void wrap_connection_ownership() throws SQLException { final Connection connection = obtainConnection(); assertThat(connection.isClosed()).isFalse(); final DBLeasedSession session = JdbcSessions.wrap(connection, provider, true); assertThat(session.isClosed()).isFalse(); session.close(); assertThat(session.isClosed()).isTrue(); assertThat(connection.isClosed()).isTrue(); }