}
}
}
if (na) {
boolean authed = this.authenticator.authenticate(new WebApplicationAuthenticationContextBase(new MockServerRequestContext(this, ctx),
this.context.getApplication().getWebXml().getLoginConfig()));
Principal principal = ((MockHttpServletRequest)ctx.getRequest().getServletRequest()).getUserPrincipal();
if (authed && principal != null && role != null) {
return context.getApplication().hasRole(context.getServletContext(), principal, role);