@Test
    @Configuration("{\r\n" +
                " \"requestUnmatched\" : \"pass\"," +
                "  \"rules\" : [\r\n" +
                "    { \"action\" : \"viewIncident\", \"role\" : \"user\" },\r\n" +
                "    { \"action\" : \"viewIncident\", \"role\" : \"admin\" }\r\n" +
                "  ]\r\n" +
                "}")
    public void testNoneMatchedPass() throws Throwable {
        HashSet<String> userRoles = new HashSet<>();

        // Should Succeed
        PolicyTestRequest request = PolicyTestRequest.build(PolicyTestRequestType.GET, "/other/resource");
        request.header("SOAPAction", "resolveIncident");
        request.contextAttribute(SoapAuthorizationPolicy.AUTHENTICATED_USER_ROLES, userRoles);
        PolicyTestResponse response = send(request);
        EchoResponse echo = response.entity(EchoResponse.class);
        Assert.assertNotNull(echo);


        // Should Succeed
        request = PolicyTestRequest.build(PolicyTestRequestType.PUT, "/admin/resource");
        request.header("SOAPAction", "closeIncident");
        request.contextAttribute(SoapAuthorizationPolicy.AUTHENTICATED_USER_ROLES, userRoles);
        response = send(request);
        echo = response.entity(EchoResponse.class);
        Assert.assertNotNull(echo);
    }
Unit test

@author rubenrm1@gmail.com
@author rachel.yordan@redhat.com
@author tevo.souza@hotmail.com
Test the {@link SoapAuthorizationPolicy}.
plugins/soap-authorization-policy/src/test/java/io/apiman/plugins/soap_authorization_policy/SoapAuthorizationPolicyTest.java