@Test
public void testMatchDelegatedTrustPolicyMatch() {

    Assertion assertion = new Assertion();
    assertion.setAction("ASSUME_ROLE");
    assertion.setEffect(AssertionEffect.ALLOW);
    assertion.setResource("*:role.Role");
    assertion.setRole("weather:role.*");
    List<Assertion> assertions = new ArrayList<>();
    assertions.add(assertion);
    Policy policy = new Policy();
    policy.setAssertions(assertions);
    List<Role> roles = new ArrayList<>();
    Role role = createRoleObject("weather",  "Role1", "user.user1");
    roles.add(role);
    role = createRoleObject("weather",  "Role", "user.user2");
    roles.add(role);
    assertTrue(AuthzHelper.matchDelegatedTrustPolicy(policy, "weather:role.Role", "user.user2", roles, devTeamFetcher));
    assertFalse(AuthzHelper.matchDelegatedTrustPolicy(policy, "weather:role.Role", "user.unknown", roles, devTeamFetcher));
}