### Question:
DirectoryEntry extends Entry { @Override public DirectoryEntry copy() { DirectoryEntry result = copyEntry(); result.myChildren.ensureCapacity(myChildren.size()); for (Entry child : myChildren) { result.unsafeAddChild(child.copy()); } return result; } DirectoryEntry(String name);  DirectoryEntry(DataInput in, boolean dummy /* to distinguish from general constructor*/); @Override void write(DataOutput out); @Override long getTimestamp(); @Override boolean isDirectory(); @Override void addChild(Entry child); @Override void removeChild(Entry child); @Override List<Entry> getChildren(); @Override boolean hasUnavailableContent(List<Entry> entriesWithUnavailableContent); @Override DirectoryEntry copy(); @Override void collectDifferencesWith(Entry right, List<Difference> result);  }### Answer:
@Test public void testCopyingWithContent() { Entry dir = new DirectoryEntry("name"); Entry copy = dir.copy(); assertEquals("name", copy.getPath()); }