@Test
public void testFlushState() {

    final TransactionTester<RemoteProxyTransaction> transactionTester = createRemoteProxyTransactionTester();
    final RemoteProxyTransaction successor = transactionTester.getTransaction();
    doAnswer(LocalProxyTransactionTest::applyToCursorAnswer).when(modification).applyToCursor(any());
    transaction.sealOnly();
    final TransactionRequest<?> request = transaction.flushState().get();
    transaction.forwardToSuccessor(successor, request, null);
    verify(modification).applyToCursor(any());
    transactionTester.getTransaction().seal();
    transactionTester.getTransaction().directCommit();
    final ModifyTransactionRequest modifyRequest =
            transactionTester.expectTransactionRequest(ModifyTransactionRequest.class);
    checkModifications(modifyRequest);
}