use of com.enonic.xp.web.exception.ExceptionRenderer in project xp by enonic.
the class AdminSiteHandlerTest method setup.
@BeforeEach
public final void setup() throws Exception {
final ExceptionMapper exceptionMapper = Mockito.mock(ExceptionMapper.class);
final ExceptionRenderer exceptionRenderer = Mockito.mock(ExceptionRenderer.class);
this.handler = new AdminSiteHandler();
this.handler.setExceptionMapper(exceptionMapper);
this.handler.setExceptionRenderer(exceptionRenderer);
this.handler.activate(mock(AdminConfig.class, invocation -> invocation.getMethod().getDefaultValue()));
final HttpServletRequest rawRequest = Mockito.mock(HttpServletRequest.class);
this.request = new WebRequest();
this.request.setRawRequest(rawRequest);
this.response = WebResponse.create().build();
}
Aggregations