@Test
public void resolvesRequest() throws Exception {

    Request request = mock(Request.class);
    when(applicationContext.getRequest()).thenReturn(request);
    when(parameter.getParameterClass()).thenReturn((Class)Request.class);
    assertSame(request, contextParameterResolver.resolve(parameter, applicationContext));
    verify(environmentContext, never()).get(any(Class.class));
}