HierarchyNode implements Serializable { public boolean hasDependencies() { return !dependencies.isEmpty(); } HierarchyNode(File file, HierarchyNode parent); void addDependency(HierarchyNode node); void addMissingDependency(String name); boolean hasDependencies(); File getFile(); Set<File> getDependencies(); Set<String> getMissingDependencies(); boolean containsDependency(File dependency); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }
@Test public void hasDependencies() { assertFalse(root.hasDependencies()); root.addDependency(new HierarchyNode(new File(), null)); assertTrue(root.hasDependencies()); }