### Question:
RootEntry extends DirectoryEntry { public RootEntry copy() { return (RootEntry)super.copy(); } RootEntry(); @Override void write(DataOutput out); RootEntry copy(); Entry ensureDirectoryExists(String path);  }### Answer:
@Test public void testCopying() { Entry copy = root.copy(); assertEquals(RootEntry.class, copy.getClass()); assertEquals(1, copy.getChildren().size()); assertNotSame(child, copy.getChildren().get(0)); assertEquals("child", copy.getChildren().get(0).getName()); }