Project extends OwnedEntity { public Set<File> getFiles() { return files; } Project();  Project(String name);  Project(String userId, String name);  Project(Project clone); @NameFormatConstraint @Override String getName(); Set<File> getFiles(); void setFiles(Set<File> files); void addFile(File file); void removeFile(File file); @Override String toString();  }
@Test public void copyConstructor() { Project another = new Project(entity); assertEquals("userId not same.", entity.getUserId(), another .getUserId()); assertTrue("files not empty.", another.getFiles().isEmpty()); }