@Test
public void testSerializeRestrictedProject(){

	Workspace workspace = PropertiesFactory.eINSTANCE.createWorkspace();
	Project project1 = PropertiesFactory.eINSTANCE.createProject();
	Project project2 = PropertiesFactory.eINSTANCE.createProject();
	Project project3 = PropertiesFactory.eINSTANCE.createProject();
	project1.setName("project1");
	project2.setName("project2");
	project3.setName("project3");
	workspace.getChildren().add(project1);
	workspace.getChildren().add(project2);
	workspace.getChildren().add(project3);
    String expected = "{\"children\":[{\"name\":\"project2\"},{\"name\":\"project3\"}],\"name\":\"workspace\"}";
    when(callback.isAuthorized(project2)).thenReturn(true);
    when(callback.isAuthorized(project3)).thenReturn(true);
    when(callback.isAuthorized(project1)).thenReturn(false);
    StringBuilder result = new StringBuilder();
    getFixture().serialize(workspace, result, 2);
    assertEquals(expected, result.toString());
}