@Test
  public void closedArtefacts() {
    // create two artefacts
    final AbstractArtefact artefact1 = epFrontendManager.createAndPersistArtefact(ident1, "text");
    assertNotNull(artefact1);

    final AbstractArtefact artefact2 = epFrontendManager.createAndPersistArtefact(ident1, "bc");
    assertNotNull(artefact2);

    dbInstance.commitAndCloseSession();

    // create a map with a page and the page has two artefacts
    final PortfolioStructureMap originalMap =
        epFrontendManager.createAndPersistPortfolioDefaultMap(ident1, "Title", "Description");
    final PortfolioStructure newPage =
        epFrontendManager.createAndPersistPortfolioPage(
            originalMap, "Page title", "Page description");

    final boolean successfullLink1 =
        epFrontendManager.addArtefactToStructure(ident1, artefact1, newPage);
    assertTrue(successfullLink1);
    final boolean successfullLink2 =
        epFrontendManager.addArtefactToStructure(ident1, artefact2, newPage);
    assertTrue(successfullLink2);

    dbInstance.commitAndCloseSession();

    // check if the artefact is in a closed map
    assertFalse(epFrontendManager.isArtefactClosed(artefact1));
    assertFalse(epFrontendManager.isArtefactClosed(artefact2));

    // closed the map artificially
    ((EPDefaultMap) originalMap).setStatus(StructureStatusEnum.CLOSED);
    dbInstance.updateObject(originalMap);
    dbInstance.commitAndCloseSession();

    // check if the artefact is in a closed map
    assertTrue(epFrontendManager.isArtefactClosed(artefact1));
    assertTrue(epFrontendManager.isArtefactClosed(artefact2));
  }