@Override
    public void openWorkspace(Workspace workspace) {
        synchronized (this) {
            closeCurrentWorkspace();
            getCurrentProject().setCurrentWorkspace(workspace);

            //Event
            fireWorkspaceEvent(EventType.SELECT, workspace);
        }
    }
@Test
    public void testOpenWorkspace() {
        ProjectControllerImpl pc = new ProjectControllerImpl();
        pc.addWorkspaceListener(workspaceListener);
        Project project = pc.newProject();
        Workspace originalWorkspace = pc.getCurrentWorkspace();
        Workspace workspace = pc.newWorkspace(project);
        pc.openWorkspace(workspace);

        Assert.assertSame(workspace, pc.getCurrentWorkspace());
        Assert.assertTrue(originalWorkspace.isClosed());
        Assert.assertTrue(workspace.isOpen());
        Mockito.verify(workspaceListener).unselect(originalWorkspace);
        Mockito.verify(workspaceListener).select(workspace);
    }