@Test
void link() throws DocumentParseException {

    Bundle fullBundle = new Bundle();
    myEncass.setProperties(new HashMap<String, Object>() {{
        put(PALETTE_FOLDER, DEFAULT_PALETTE_FOLDER_LOCATION);
    }});
    fullBundle.addEntity(myEncass);
    fullBundle.addEntity(createPolicy("myEncassPolicy", "1", "1", "1", DocumentUtils.stringToXML(DocumentTools.INSTANCE, ENCASS_POLICY_WITH_PORTAL_INTEGRATION), EMPTY));
    fullBundle.addEntity(createFolder("myFolder", "1", null));
    FolderTree folderTree = new FolderTree(fullBundle.getEntities(Folder.class).values());
    fullBundle.setFolderTree(folderTree);
    encassLinker.link(bundle, fullBundle);
    assertEquals("myEncassPolicy", bundle.getEntities(Encass.class).get("1").getPath());
}