InternalAsyncSession extends AsyncAbstractQueryRunner implements AsyncSession { @Override public CompletionStage<Void> closeAsync() { return session.closeAsync(); } InternalAsyncSession( NetworkSession session ); @Override CompletionStage<ResultCursor> runAsync(Query query); @Override CompletionStage<ResultCursor> runAsync(String query, TransactionConfig config ); @Override CompletionStage<ResultCursor> runAsync(String query, Map<String,Object> parameters, TransactionConfig config ); @Override CompletionStage<ResultCursor> runAsync(Query query, TransactionConfig config ); @Override CompletionStage<Void> closeAsync(); @Override CompletionStage<AsyncTransaction> beginTransactionAsync(); @Override CompletionStage<AsyncTransaction> beginTransactionAsync( TransactionConfig config ); @Override CompletionStage<T> readTransactionAsync( AsyncTransactionWork<CompletionStage<T>> work ); @Override CompletionStage<T> readTransactionAsync( AsyncTransactionWork<CompletionStage<T>> work, TransactionConfig config ); @Override CompletionStage<T> writeTransactionAsync( AsyncTransactionWork<CompletionStage<T>> work ); @Override CompletionStage<T> writeTransactionAsync( AsyncTransactionWork<CompletionStage<T>> work, TransactionConfig config ); @Override Bookmark lastBookmark();  }
@Test void shouldCloseSession() throws Throwable { await ( asyncSession.closeAsync() ); assertFalse( this.session.isOpen() ); }