test_class.declarator: parameter
test_class.modifier: private
test_class.original_string: private Parameter                parameter;
test_class.type: Parameter
test_class.var_name: parameter
test_class.declarator: applicationContext
test_class.modifier: private
test_class.original_string: private ApplicationContext       applicationContext;
test_class.type: ApplicationContext
test_class.var_name: applicationContext
test_class.declarator: environmentContext
test_class.modifier: private
test_class.original_string: private EnvironmentContext       environmentContext;
test_class.type: EnvironmentContext
test_class.var_name: environmentContext
test_class.declarator: contextParameterResolver
test_class.modifier: private
test_class.original_string: private ContextParameterResolver contextParameterResolver;
test_class.type: ContextParameterResolver
test_class.var_name: contextParameterResolver
test_class.file: everrest-core/src/test/java/org/everrest/core/impl/method/ContextParameterResolverTest.java
test_class.identifier: ContextParameterResolverTest
test_case.body: @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));
      }
test_case.class_method_signature: ContextParameterResolverTest.resolvesApplication()
test_case.full_signature: @Test public void resolvesApplication()
test_case.identifier: resolvesApplication
test_case.invocations: mock thenReturn when getApplication thenReturn when getParameterClass assertSame resolve get verify never any
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void resolvesApplication()
focal_class.file: everrest-core/src/main/java/org/everrest/core/impl/method/ContextParameterResolver.java
focal_class.identifier: ContextParameterResolver
focal_class.interfaces: implements ParameterResolver<Context>
focal_class.class_method_signature: ContextParameterResolver.resolve(org.everrest.core.Parameter parameter, ApplicationContext context)
focal_class.full_signature: @Override public Object resolve(org.everrest.core.Parameter parameter, ApplicationContext context)
focal_class.identifier: resolve
focal_class.modifiers: @Override public
focal_class.parameters: (org.everrest.core.Parameter parameter, ApplicationContext context)
focal_class.return: Object
focal_class.signature: Object resolve(org.everrest.core.Parameter parameter, ApplicationContext context)
focal_method.body: @Override
      public Object resolve(org.everrest.core.Parameter parameter, ApplicationContext context) throws Exception {
          Class<?> parameterClass = parameter.getParameterClass();
          if (parameterClass == HttpHeaders.class) {
              return context.getHttpHeaders();
          } else if (parameterClass == SecurityContext.class) {
              return context.getSecurityContext();
          } else if (parameterClass == Request.class) {
              return context.getRequest();
          } else if (parameterClass == UriInfo.class) {
              return context.getUriInfo();
          } else if (parameterClass == Providers.class) {
              return context.getProviders();
          } else if (parameterClass == Application.class) {
              return context.getApplication();
          } else if (parameterClass == InitialProperties.class) {
              return context.getInitialProperties();
          }
          return EnvironmentContext.getCurrent().get(parameter.getParameterClass());
      }
focal_method.class_method_signature: ContextParameterResolver.resolve(org.everrest.core.Parameter parameter, ApplicationContext context)
focal_method.full_signature: @Override public Object resolve(org.everrest.core.Parameter parameter, ApplicationContext context)
focal_method.identifier: resolve
focal_method.invocations: getParameterClass getHttpHeaders getSecurityContext getRequest getUriInfo getProviders getApplication getInitialProperties get getCurrent getParameterClass
focal_method.modifiers: @Override public
focal_method.parameters: (org.everrest.core.Parameter parameter, ApplicationContext context)
focal_method.return: Object
focal_method.signature: Object resolve(org.everrest.core.Parameter parameter, ApplicationContext context)