@Test
void linkMissingPolicy() {

    PolicyBackedServiceLinker policyBackedServiceLinker = new PolicyBackedServiceLinker();
    Map<String, String> operations = new HashMap<>();
    operations.put("operation1", "1");
    operations.put("operation2", "2");
    PolicyBackedService myPolicyBackedService = createPolicyBackedService("myEncass", "1", "PolicyBackedService", operations);
    Bundle bundle = new Bundle();
    bundle.addEntity(myPolicyBackedService);
    Bundle fullBundle = new Bundle();
    fullBundle.addEntity(myPolicyBackedService);
    fullBundle.addEntity(createPolicy("operation1Policy", "1", "1", "1", null, ""));
    fullBundle.addEntity(createPolicy("operation3Policy", "3", "3", "1", null, ""));
    fullBundle.addEntity(createFolder("myFolder", "1", null));
    FolderTree folderTree = new FolderTree(fullBundle.getEntities(Folder.class).values());
    fullBundle.setFolderTree(folderTree);
    assertThrows(LinkerException.class, () -> policyBackedServiceLinker.link(bundle, fullBundle));
}