@Test
public void resolvesApplication() throws Exception {

    Application application = mock(Application.class);
    when(applicationContext.getApplication()).thenReturn(application);
    when(parameter.getParameterClass()).thenReturn((Class)Application.class);
    assertSame(application, contextParameterResolver.resolve(parameter, applicationContext));
    verify(environmentContext, never()).get(any(Class.class));
}