final HtmlTextInput email = form.getInputByName("j_username");
email.setValueAttribute("myself");
final HtmlPasswordInput password = form.getInputByName("j_password");
password.setValueAttribute("myself");
final HtmlSubmitInput submit = form.getInputByValue("Login");
final HtmlPage callbackPage = submit.click();
String samlResponse = ((HtmlInput) callbackPage.getElementByName("SAMLResponse")).getValueAttribute();
String relayState = ((HtmlInput) callbackPage.getElementByName("RelayState")).getValueAttribute();
mockWebContext.addRequestParameter("SAMLResponse", samlResponse);
mockWebContext.addRequestParameter("RelayState", relayState);
mockWebContext.setRequestMethod("POST");