PruningDataTreeModification extends ForwardingObject implements DataTreeModification { @Override public final void delete(final YangInstanceIdentifier path) { try { delegate.delete(path); } catch (SchemaValidationFailedException e) { LOG.warn("Node at path : {} does not exist ignoring delete", path); } } PruningDataTreeModification(final DataTreeModification delegate, final DataTree dataTree,
            final ReusableNormalizedNodePruner pruner); @Override final EffectiveModelContext getEffectiveModelContext(); @Override final void delete(final YangInstanceIdentifier path); @Override final void ready(); @Override final void applyToCursor(final DataTreeModificationCursor dataTreeModificationCursor); @Override final Optional<NormalizedNode<?, ?>> readNode(final YangInstanceIdentifier yangInstanceIdentifier); @Override final DataTreeModification newModification();  }
@Test public void testDelete() { pruningDataTreeModification.delete(CarsModel.BASE_PATH); verify(mockModification, times(1)).delete(CarsModel.BASE_PATH); }
@Test public void testDeleteOnException() { YangInstanceIdentifier path = CarsModel.BASE_PATH; doThrow(SchemaValidationFailedException.class).when(mockModification).delete(path); pruningDataTreeModification.delete(path); verify(mockModification, times(1)).delete(path); }