@Test
void bookmarkIsPropagatedBetweenTransactions()
{

    Bookmark bookmark1 = InternalBookmark.parse( "Bookmark1" );
    Bookmark bookmark2 = InternalBookmark.parse( "Bookmark2" );
    NetworkSession session = newSession( connectionProvider );
    BoltProtocol protocol = spy( BoltProtocolV4.INSTANCE );
    doReturn( completedFuture( bookmark1 ), completedFuture( bookmark2 ) ).when( protocol ).commitTransaction( any( Connection.class ) );
    when( connection.protocol() ).thenReturn( protocol );
    UnmanagedTransaction tx1 = beginTransaction( session );
    await( tx1.commitAsync() );
    assertEquals( bookmark1, session.lastBookmark() );
    UnmanagedTransaction tx2 = beginTransaction( session );
    verifyBeginTx( connection, bookmark1 );
    await( tx2.commitAsync() );
    assertEquals( bookmark2, session.lastBookmark() );
}