@org.junit.Test
public void testUsernameTokenWSHandlerNonceCreated() throws Exception {
CustomHandler handler = new CustomHandler();
Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
RequestData reqData = new RequestData();
java.util.Map<String, Object> config = new java.util.TreeMap<String, Object>();
config.put("password", "verySecret");
config.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
config.put(WSHandlerConstants.ADD_USERNAMETOKEN_NONCE, "true");
config.put(WSHandlerConstants.ADD_USERNAMETOKEN_CREATED, "true");
reqData.setUsername("wernerd");
reqData.setMsgContext(config);
HandlerAction action = new HandlerAction(WSConstants.UT);
handler.send(
doc,
reqData,