@Test
public void setsUpEnvironmentContext() throws Exception {

    everrestServlet.service(request, response);
    ArgumentCaptor<EnvironmentContext> envCaptor = ArgumentCaptor.forClass(EnvironmentContext.class);
    verify(everrestProcessor).process(isA(ServletContainerRequest.class), isA(ContainerResponse.class), envCaptor.capture());
    EnvironmentContext env = envCaptor.getValue();
    assertSame(request, env.get(HttpServletRequest.class));
    assertSame(response, env.get(HttpServletResponse.class));
    assertSame(servletConfig, env.get(ServletConfig.class));
    assertSame(servletContext, env.get(ServletContext.class));
    assertNotNull(env.get(WebApplicationDeclaredRoles.class));
    assertNotNull(env.get(ErrorPages.class));
}