public MockServerValve(WebServer server, WebApplicationDeploymentContext context, ServletRequest request, ServletResponse response) {
this.server = server;
this.context = context;
this.request = new WebApplicationRequestBase(request);
this.response = new WebApplicationResponseBase(response);
if (context.getApplication().getWebXml().getLoginConfig() != null) {
this.authenticationType = context.getApplication().getWebXml().getLoginConfig().getAuthMethod();
} else
this.authenticationType = null;