### Question:
DirectoryEntry extends Entry { @Override public boolean hasUnavailableContent(List<Entry> entriesWithUnavailableContent) { for (Entry e : myChildren) { e.hasUnavailableContent(entriesWithUnavailableContent); } return !entriesWithUnavailableContent.isEmpty(); } 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 @Ignore public void testHasUnavailableContent() { Entry dir = new DirectoryEntry("dir"); assertHasNoUnavailableContent(dir); dir.addChild(new FileEntry("f", c("abc"), -1, false)); assertHasNoUnavailableContent(dir); FileEntry f1 = new FileEntry("f1", new StoredContent(-1), -1, false); FileEntry f2 = new FileEntry("f2", new StoredContent(-1), -1, false); DirectoryEntry subDir = new DirectoryEntry("subDir"); dir.addChild(subDir); dir.addChild(f1); subDir.addChild(f2); assertHasUnavailableContent(dir, f2, f1); assertHasUnavailableContent(subDir, f2); }