usernameCred.setName("username");
usernameCred.setSourceValue(credentials.getUsernameValue());
usernameCred.setSourceXPath(credentials.getUsernameXPath());
/*insert test value*/
Input testInputUserName = new Input();
SynapseXPath usernameXpathExpr = null;
//create xpath expr
usernameXpathExpr = new SynapseXPath("//ns2:WebRequest/ns2:user");
usernameXpathExpr.addNamespace("ns2", "http://wso2.org/sample");
testInputUserName.setSourceXPath(usernameXpathExpr);
testInputUserName.setName(usernameCred.getName());
map.put(usernameCred.getName(), testInputUserName);
credInputsList.add(usernameCred);
Input passwordCred = new Input();
passwordCred.setName("password");
passwordCred.setSourceValue(credentials.getPasswordValue());
passwordCred.setSourceXPath(credentials.getPasswordXPath());
/*insert test value*/
Input testInputPassword = new Input();
SynapseXPath passwordXpathExpr = new SynapseXPath("//ns27:WebRequest/ns27:pass");
passwordXpathExpr.addNamespace("ns27", "http://wso2.org/sample");
testInputPassword.setSourceXPath(passwordXpathExpr);
testInputPassword.setName(passwordCred.getName());
map.put(passwordCred.getName(), testInputPassword);
credInputsList.add(passwordCred);