@Test
    @Configuration("{\r\n" +
                "  \"rules\" : [\r\n" +
                "    { \"action\" : \"*\", \"role\" : \"role-1\" }\r\n" +
                "  ]\r\n" +
                "}")
    public void testNoSOAPHeader() throws Throwable {
        HashSet<String> userRoles = new HashSet<>();
        userRoles.add("role-1");

        PolicyTestRequest request = PolicyTestRequest.build(PolicyTestRequestType.GET, "/invoices/1");

        try {
        	request.contextAttribute(SoapAuthorizationPolicy.AUTHENTICATED_USER_ROLES, userRoles);
        	send(request);
        	Assert.fail("expected a failure response");
        } catch (PolicyFailureError failure) {
        	 Assert.assertNotNull(failure.getFailure());
        	 Assert.assertEquals(PolicyFailureType.Other, failure.getFailure().getType());
        }
    }
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