@Test
void testPrepareEncapsulatedAssertionMissingPolicyPath() {

    Element encapsulatedAssertionElement = createEncapsulatedAssertionElement(document, "my-encass", "ad620794-a27f-4d94-85b7-669ba838367b");
    document.appendChild(encapsulatedAssertionElement);
    policyBuilderContext = new PolicyBuilderContext("path.xml", document, bundle, new IdGenerator());
    policyBuilderContext.withPolicy(policy);
    policyBuilderContext.withAnnotatedBundle(null);
    EntityBuilderException exception = assertThrows(EntityBuilderException.class, () -> encapsulatedAssertionBuilder.buildAssertionElement(encapsulatedAssertionElement, policyBuilderContext));
    assertTrue(exception.getMessage().contains(policy.getPath()));
}