Workspace implements Serializable { public void addProject(Project project) { Validate.notNull(project, "Project can't be null"); projectMetadata.put(project, new ProjectMetadata(project)); if (projects != null) { int index = projects.indexOf(project); if(index == -1) { projects.add(project); } else { projects.set(index, project); } } } Workspace(Map<Project, ProjectMetadata> projectMetadata,
            Set<File> predefinedFiles, List<PreferencesFile> preferencesFiles); int getProjectCount(); List<Project> getProjects(); void addProject(Project project); void removeProject(Project project); void addFile(File file, Hierarchy hierarchy); void removeFile(File file, Hierarchy hierarchy); Hierarchy getHierarchy(Project project); Set<File> getFiles(Project project); Set<File> getPredefinedFiles(); List<PreferencesFile> getPreferencesFiles(); @Override String toString();  }
@Test(expected = IllegalArgumentException.class) public void addProject() { workspace.addProject(null); }