private void doTest(String xmlBody, String expectedResult,
boolean verifyIdentity, String username, String password, String domain) {
LOGGER.info("Test: " + getName());
LOGGER.info("xmlBody:\n " + xmlBody);
MockManager manager = MockManager.getInstance();
manager.setShouldVerifyIdentity(verifyIdentity);
if (verifyIdentity) {
manager.setExpectedIdentity(domain, username, password, null);
}
StringWriter writer = new StringWriter();
PrintWriter out = new PrintWriter(writer);
AuthorizationHandler authorizationHandler =
AuthorizationHandler.makeAuthorizationHandlerForTest(xmlBody, manager,