@Test
void updatesBookmarkWhenTxIsClosed()
{

    Bookmark bookmarkAfterCommit = InternalBookmark.parse( "TheBookmark" );
    BoltProtocol protocol = spy( BoltProtocolV4.INSTANCE );
    doReturn( completedFuture( bookmarkAfterCommit ) ).when( protocol ).commitTransaction( any( Connection.class ) );
    when( connection.protocol() ).thenReturn( protocol );
    UnmanagedTransaction tx = beginTransaction( session );
    assertThat( session.lastBookmark(), instanceOf( InternalBookmark.class ) );
    Bookmark bookmark = (InternalBookmark) session.lastBookmark();
    assertTrue( bookmark.isEmpty() );
    await( tx.commitAsync() );
    assertEquals( bookmarkAfterCommit, session.lastBookmark() );
}