@Override
    public void removeProject(Project project) {
        synchronized (this) {
            if (projects.getCurrentProject() == project) {
                closeCurrentProject();
            }
            projects.removeProject((ProjectImpl) project);
        }
    }
@Test
    public void testRemoveProject() {
        ProjectControllerImpl pc = new ProjectControllerImpl();
        pc.addProjectListener(projectListener);
        Project project = pc.newProject();
        pc.removeProject(project);
        Assert.assertFalse(pc.hasCurrentProject());
        Assert.assertTrue(pc.getAllProjects().isEmpty());
        Assert.assertTrue(project.isClosed());
        Mockito.verify(projectListener).closed(project);
    }