SimpleHibernatePropertyResolver extends SimplePropertyResolver implements HibernatePropertyResolver { @Override public String resolveXField(String propertyName, Class<?> entityClass) { return resolveAnnotatedSubFieldName(propertyName, entityClass, XField.class, xFieldExtractor); }  @Override String resolveXField(String propertyName, Class<?> entityClass); @Override String resolveYField(String propertyName, Class<?> entityClass);  }
@Test public void testXField_LatLon() { String resolved = resolver.resolveXField("latlon", WithLatLon.class); assertEquals("latlon.latitude", resolved); }
@Test public void testXField_LatLonCustom() { String resolved = resolver.resolveXField("latlon", WithLatLonCustom.class); assertEquals("latlon.lat", resolved); }
@Test(expected = IllegalArgumentException.class) public void testXField_LatLonSub_IllegalArgumentException() { resolver.resolveXField("latlon", WithLatLonSub.class); }
@Test(expected = IllegalArgumentException.class) public void testXField_NoGeo_IllegalArgumentException_noSubFieldAnnotation() { resolver.resolveXField("property", NoGeo.class); }
@Test(expected = IllegalArgumentException.class) public void testXField_NoGeo_IllegalArgumentException_notValidProperty() { resolver.resolveXField("notvalidproperty", NoGeo.class); }