InternalAsyncSession extends AsyncAbstractQueryRunner implements AsyncSession { @Override public Bookmark lastBookmark() { return session.lastBookmark(); } 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 shouldReturnBookmark() throws Throwable { session = newSession( connectionProvider, InternalBookmark.parse( "Bookmark1" ) ); asyncSession = new InternalAsyncSession( session ); assertThat( asyncSession.lastBookmark(), equalTo( session.lastBookmark() )); }