LocalTransactionContext extends AbstractTransactionContext { @Override public void executeDelete(final YangInstanceIdentifier path, final Boolean havePermit) { executeModification(transaction -> transaction.delete(path)); } LocalTransactionContext(final DOMStoreTransaction txDelegate, final TransactionIdentifier identifier,
            final LocalTransactionReadySupport readySupport); @Override void executeDelete(final YangInstanceIdentifier path, final Boolean havePermit); @Override void executeMerge(final YangInstanceIdentifier path, final NormalizedNode<?, ?> data,
            final Boolean havePermit); @Override void executeWrite(final YangInstanceIdentifier path, final NormalizedNode<?, ?> data,
            final Boolean havePermit); @Override void executeRead(final AbstractRead<T> readCmd, final SettableFuture<T> proxyFuture,
            final Boolean havePermit); @Override Future<ActorSelection> readyTransaction(final Boolean havePermit,
            final Optional<SortedSet<String>> participatingShardNames); @Override Future<Object> directCommit(final Boolean havePermit); @Override void closeTransaction();  }
@Test public void testDelete() { YangInstanceIdentifier yangInstanceIdentifier = YangInstanceIdentifier.empty(); localTransactionContext.executeDelete(yangInstanceIdentifier, null); verify(readWriteTransaction).delete(yangInstanceIdentifier); }
@Test public void testReadyWithDeleteError() { YangInstanceIdentifier yangInstanceIdentifier = YangInstanceIdentifier.empty(); RuntimeException error = new RuntimeException("mock"); doThrow(error).when(readWriteTransaction).delete(yangInstanceIdentifier); localTransactionContext.executeDelete(yangInstanceIdentifier, null); localTransactionContext.executeDelete(yangInstanceIdentifier, null); verify(readWriteTransaction).delete(yangInstanceIdentifier); doReadyWithExpectedError(error); }