LocalReadOnlyProxyTransaction extends LocalProxyTransaction { @Override void replayModifyTransactionRequest(final ModifyTransactionRequest request, final Consumer<Response<?, ?>> callback, final long enqueuedTicks) { commonModifyTransactionRequest(request); enqueueAbort(callback, enqueuedTicks); } LocalReadOnlyProxyTransaction(final ProxyHistory parent, final TransactionIdentifier identifier,
        final DataTreeSnapshot snapshot);   LocalReadOnlyProxyTransaction(final ProxyHistory parent, final TransactionIdentifier identifier);   }
@Test public void testApplyModifyTransactionRequest() { final TestProbe probe = createProbe(); final ModifyTransactionRequestBuilder builder = new ModifyTransactionRequestBuilder(TRANSACTION_ID, probe.ref()); builder.setSequence(0); builder.setAbort(); final ModifyTransactionRequest request = builder.build(); transaction.replayModifyTransactionRequest(request, createCallbackMock(), Ticker.systemTicker().read()); getTester().expectTransactionRequest(AbortLocalTransactionRequest.class); }
@Test public void testApplyModifyTransactionRequestNotAbort() throws Exception { final TestProbe probe = createProbe(); final ModifyTransactionRequestBuilder builder = new ModifyTransactionRequestBuilder(TRANSACTION_ID, probe.ref()); builder.setSequence(0); builder.setReady(); final ModifyTransactionRequest request = builder.build(); assertOperationThrowsException(() -> transaction.replayModifyTransactionRequest(request, createCallbackMock(), Ticker.systemTicker().read()), VerifyException.class); }