WritableNodeOperation implements WriteCursorStrategy { @Override public final WriteCursorStrategy enter(final PathArgument arg) { cursor.enter(arg); WriteableModificationNode child = node.getChild(arg); if (child != null) { return child.createOperation(cursor); } return new DelegatingWriteCursorStrategy() { @Override protected DOMDataTreeWriteCursor delegate() { return cursor; } }; } protected  WritableNodeOperation(final WriteableModificationNode node, final DOMDataTreeWriteCursor cursor); @Override final void delete(final PathArgument arg); @Override final void merge(final PathArgument arg, final NormalizedNode<?, ?> data); @Override final void write(final PathArgument arg, final NormalizedNode<?, ?> data); @Override final WriteCursorStrategy enter(final PathArgument arg); @Override final void mergeToCurrent(final NormalizedNodeContainer<?, ?, ?> data); @Override @SuppressWarnings("rawtypes") final void writeToCurrent(final NormalizedNodeContainer<?, ?, ?> data);  }
@Test public void enterTest() throws Exception { Assert.assertEquals(TestUtils.DOM_DATA_TREE_WRITE_CURSOR, this.getCursor()); returnNull(); Assert.assertEquals(TestUtils.DOM_DATA_TREE_WRITE_CURSOR.toString(), this.enter(TestUtils.PATH_ARGUMENT).toString()); verify(TestUtils.DOM_DATA_TREE_WRITE_CURSOR).enter(TestUtils.PATH_ARGUMENT); verify(TestUtils.WRITEABLE_MODIFICATION_NODE).getChild(TestUtils.PATH_ARGUMENT); returnNoNull(); this.enter(TestUtils.PATH_ARGUMENT); verify(TestUtils.WRITEABLE_MODIFICATION_NODE).createOperation(TestUtils.DOM_DATA_TREE_WRITE_CURSOR); }