SolrjPropertyResolver implements PropertyResolver { @Override public String resolve(String fieldName, Class<?> entityClass) { try { java.lang.reflect.Field field = entityClass.getDeclaredField(fieldName); if (field.isAnnotationPresent(Field.class)) { return field.getAnnotation(Field.class).value(); } } catch (Exception e) { log.warn("Unabled to resolve name for field: " + fieldName, e); } return fieldName; }  @Override String resolve(String fieldName, Class<?> entityClass);  }
@Test public void resolve_name() { assertEquals("name", resolver.resolve("name", TestMappedClass.class)); }
@Test public void resolve_thisProperty() { assertEquals("thatProperty", resolver.resolve("thisProperty", TestMappedClass.class)); }