@Test
public void injectsField() throws Exception {

    when(pathParameterResolver.resolve(isA(Parameter.class), eq(applicationContext))).thenReturn("path parameter");
    FieldInjectorImpl fieldInjector = new FieldInjectorImpl(Resource.class.getDeclaredField("pathParam"), parameterResolverFactory);
    Resource instance = new Resource();
    fieldInjector.inject(instance, applicationContext);
    assertEquals("path parameter", instance.pathParam);
}