### Question:
DefaultAtomicDocumentTree implements AtomicDocumentTree<V> { @Override public boolean create(DocumentPath path, V value) { checkRootModification(path); DocumentTreeNode<V> node = getNode(path); if (node != null) { return false; } DocumentPath parentPath = path.parent(); DefaultDocumentTreeNode<V> parentNode = getNode(parentPath); if (parentNode == null) { throw new IllegalDocumentModificationException(); } parentNode.addChild(simpleName(path), value, versionSupplier.get()); return true; } DefaultAtomicDocumentTree();  DefaultAtomicDocumentTree(Supplier<Long> versionSupplier, Ordering ordering);   DefaultAtomicDocumentTree(Supplier<Long> versionSupplier, DefaultDocumentTreeNode<V> root); @Override String name(); @Override PrimitiveType type(); @Override PrimitiveProtocol protocol(); @Override DocumentPath root(); @Override Map<String, Versioned<V>> getChildren(DocumentPath path); @Override Versioned<V> get(DocumentPath path); @Override Versioned<V> set(DocumentPath path, V value); @Override boolean create(DocumentPath path, V value); @Override boolean createRecursive(DocumentPath path, V value); @Override boolean replace(DocumentPath path, V newValue, long version); @Override boolean replace(DocumentPath path, V newValue, V currentValue); @Override Versioned<V> remove(DocumentPath path); @Override void addListener(DocumentPath path, DocumentTreeEventListener<V> listener, Executor executor); @Override void removeListener(DocumentTreeEventListener<V> listener); @Override void close(); @Override AsyncAtomicDocumentTree<V> async();  }### Answer:
@Test public void testCreateNodeAtRoot() { AtomicDocumentTree<String> tree = new DefaultAtomicDocumentTree<>(); Assert.assertTrue(tree.create(path("/a"), "bar")); Assert.assertFalse(tree.create(path("/a"), "baz")); }
@Test public void testCreateNodeAtNonRoot() { AtomicDocumentTree<String> tree = new DefaultAtomicDocumentTree<>(); tree.create(path("/a"), "bar"); Assert.assertTrue(tree.create(path("/a/b"), "baz")); }
@Test(expected = IllegalDocumentModificationException.class) public void testCreateNodeFailure() { AtomicDocumentTree<String> tree = new DefaultAtomicDocumentTree<>(); tree.create(path("/a/b"), "bar"); }