NetworkSession { public CompletionStage<Void> resetAsync() { return existingTransactionOrNull() .thenAccept( tx -> { if ( tx != null ) { tx.markTerminated( null ); } } ) .thenCompose( ignore -> connectionStage ) .thenCompose( connection -> { if ( connection != null ) { return connection.reset(); } return completedWithNull(); } ); } NetworkSession( ConnectionProvider connectionProvider, RetryLogic retryLogic, DatabaseName databaseName, AccessMode mode,
            BookmarkHolder bookmarkHolder, long fetchSize, Logging logging ); CompletionStage<ResultCursor> runAsync(Query query, TransactionConfig config, boolean waitForRunResponse ); CompletionStage<RxResultCursor> runRx(Query query, TransactionConfig config ); CompletionStage<UnmanagedTransaction> beginTransactionAsync( TransactionConfig config ); CompletionStage<UnmanagedTransaction> beginTransactionAsync( AccessMode mode, TransactionConfig config ); CompletionStage<Void> resetAsync(); RetryLogic retryLogic(); Bookmark lastBookmark(); CompletionStage<Void> releaseConnectionAsync(); CompletionStage<Connection> connectionAsync(); boolean isOpen(); CompletionStage<Void> closeAsync();  }
@Test void connectionShouldBeResetAfterSessionReset() { run( session, "RETURN 1" ); verify( connection, never() ).reset(); verify( connection, never() ).release(); await( session.resetAsync() ); verify( connection ).reset(); verify( connection, never() ).release(); }