ProjectMetadata implements Serializable { public void setHierarchy(Hierarchy hierarchy) { Validate.notNull(hierarchy, "Hierarchy can't be null"); this.hierarchy = hierarchy; } @SuppressWarnings("unchecked")  ProjectMetadata(Project project);  ProjectMetadata(Hierarchy hierarchy, Set<File> files); Project getProject(); Set<File> getFiles(); Hierarchy getHierarchy(); void setHierarchy(Hierarchy hierarchy); void addFile(File file); void removeFile(File file); @Override String toString();  }
@Test(expected = IllegalArgumentException.class) public void setHierarchy() { metadata.setHierarchy(null); }