String operation = "{http://www.example.org/contract/DoubleIt}DoubleIt";
MessageImpl msg = new MessageImpl();
msg.put(Message.WSDL_OPERATION, operation);
XACMLRequestBuilder builder = new DefaultXACMLRequestBuilder();
RequestType request =
builder.createRequest(principal, Collections.singletonList("manager"), msg);
assertNotNull(request);
String action =
request.getAction().getAttributes().get(0).getAttributeValues().get(0).getValue();
assertEquals(action, "execute");
((DefaultXACMLRequestBuilder)builder).setAction("write");
request = builder.createRequest(principal, Collections.singletonList("manager"), msg);
assertNotNull(request);
action =
request.getAction().getAttributes().get(0).getAttributeValues().get(0).getValue();
assertEquals(action, "write");
}