reqData.setWssConfig(cfg);
java.util.Map<String, Object> messageContext = new java.util.TreeMap<String, Object>();
messageContext.put("password", "securityPassword");
reqData.setMsgContext(messageContext);
WSHandler handler = new CustomHandler();
CallbackHandler callbackHandler =
handler.getCallbackHandler("SomeCallbackTag", "SomeCallbackRef", reqData);
WSPasswordCallback callback =
handler.getPasswordCB("alice", WSConstants.UT, callbackHandler, reqData);
assertTrue("alice".equals(callback.getIdentifier()));
assertTrue("securityPassword".equals(callback.getPassword()));
assertTrue(WSPasswordCallback.USERNAME_TOKEN == callback.getUsage());
}