@Test
public void checkConstructContent() {

    final Path path = mock(Path.class);
    final Overview overview = mock(Overview.class);
    final PackageDataModelOracle oracle = mock(PackageDataModelOracle.class);
    when(oracle.getModuleCollectionTypes()).thenReturn(new HashMap<String, Boolean>() {{
        put("java.util.List",
            true);
        put("java.util.Set",
            true);
        put("java.util.Collection",
            true);
        put("java.util.UnknownCollection",
            false);
    }});
    final Set<PortableWorkDefinition> workItemDefinitions = new HashSet<>();
    when(path.toURI()).thenReturn("file://project/src/main/resources/mypackage/dtable.gdst");
    when(dataModelService.getDataModel(eq(path))).thenReturn(oracle);
    when(workItemsService.loadWorkItemDefinitions(eq(path))).thenReturn(workItemDefinitions);
    final GuidedDecisionTableEditorContent content = service.constructContent(path,
                                                                              overview);
    verify(resourceOpenedEvent,
           times(1)).fire(any(ResourceOpenedEvent.class));
    assertNotNull(content.getModel());
    assertNotNull(content.getDataModel());
    assertNotNull(content.getWorkItemDefinitions());
    assertEquals(overview,
                 content.getOverview());
    assertEquals(3,
                 content.getDataModel().getCollectionTypes().size());
    assertTrue(content.getDataModel().getCollectionTypes().containsKey("java.util.Collection"));
    assertTrue(content.getDataModel().getCollectionTypes().containsKey("java.util.List"));
    assertTrue(content.getDataModel().getCollectionTypes().containsKey("java.util.Set"));
}