@Test
void simplifyPolicy() {

    String policyID = new IdGenerator().generate();
    String testName = "test";
    Policy policy = new Policy.Builder()
            .setGuid(policyID)
            .setName(testName)
            .setParentFolderId(ROOT_FOLDER_ID)
            .build();
    Bundle bundle = new Bundle();
    bundle.addEntity(policy);
    bundle.addEntity(ROOT_FOLDER);
    FolderTree folderTree = new FolderTree(bundle.getEntities(Folder.class).values());
    bundle.setFolderTree(folderTree);
    Document document = DocumentTools.INSTANCE.getDocumentBuilder().newDocument();
    Element policyXML = createElementWithChildren(
            document,
            "wsp:Policy",
            createIncludeAssertionElement(document, policyID)
    );
    InjectionRegistry.getInstance(PolicyXMLSimplifier.class).simplifyPolicyXML(policyXML, policy.getName(), bundle, bundle);
}