@Test
public void resolvesSecurityContext() throws Exception {

    SecurityContext securityContext = mock(SecurityContext.class);
    when(applicationContext.getSecurityContext()).thenReturn(securityContext);
    when(parameter.getParameterClass()).thenReturn((Class)SecurityContext.class);
    assertSame(securityContext, contextParameterResolver.resolve(parameter, applicationContext));
    verify(environmentContext, never()).get(any(Class.class));
}