Buggy code:
public class GeoIT extends AbstractCoreIT { private static final Logger LOG = LoggerFactory . getLogger ( GeoIT . class ) ; int NEARBY_RADIUS = 10000 ; int CIRCUMFERENCE_OF_THE_EARTH = 40000000 ; private static List < Map < String , Object > > LOCATION_PROPERTIES = new ArrayList < Map < String , Object > > ( ) ; public GeoIT ( ) throws Exception { } @ Test public void testRemovedLocationQuery ( ) throws Exception { } @ Test public void testMovingTarget ( ) throws Exception { } @ Test public void testGeoDistanceOfConnection ( ) throws Exception { EntityManager em = app . getEntityManager ( ) ; assertNotNull ( em ) ; Map < String , Object > restaurantProps = new LinkedHashMap < String , Object > ( ) ; restaurantProps . put ( "name" , "Brickhouse" ) ; restaurantProps . put ( "address" , "426<seq2seq4repair_space>Brannan<seq2seq4repair_space>Street" ) ; <START_BUG> restaurantProps . put ( "location" , getLocation ( 37.776753 , ( - 122.407846 ) ) ) ; <END_BUG> Entity restaurant = em . create ( "restaurant" , restaurantProps ) ; assertNotNull ( restaurant ) ; Map < String , Object > userProperties = new LinkedHashMap < String , Object > ( ) { } ; Entity user = em . create ( "user" , userProperties ) ; assertNotNull ( user ) ; em . refreshIndex ( ) ; em . createConnection ( user , "likes" , restaurant ) ; em . refreshIndex ( ) ; Results emSearchResults = em . searchConnectedEntities ( user , Query . fromQL ( ( ( ( "location<seq2seq4repair_space>within<seq2seq4repair_space>5000<seq2seq4repair_space>of<seq2seq4repair_space>" + ( ( ( LinkedHashMap < String , Object > ) ( userProperties . get ( "location" ) ) ) . get ( "latitude" ) ) ) + ",<seq2seq4repair_space>" ) + ( ( ( LinkedHashMap < String , Object > ) ( userProperties . get ( "location" ) ) ) . get ( "longitude" ) ) ) ) . setConnectionType ( "likes" ) ) ; assertEquals ( 1 , emSearchResults . size ( ) ) ; emSearchResults = em . searchConnectedEntities ( user , Query . fromQL ( ( ( ( "location<seq2seq4repair_space>within<seq2seq4repair_space>1000<seq2seq4repair_space>of<seq2seq4repair_space>" + ( ( ( LinkedHashMap < String , Object > ) ( userProperties . get ( "location" ) ) ) . get ( "latitude" ) ) ) + ",<seq2seq4repair_space>" ) + ( ( ( LinkedHashMap < String , Object > ) ( userProperties . get ( "location" ) ) ) . get ( "longitude" ) ) ) ) . setConnectionType ( "likes" ) ) ; assertEquals ( 0 , emSearchResults . size ( ) ) ; em . delete ( user ) ; em . delete ( restaurant ) ; } @ Test public void testGeolocationEntities ( ) throws Exception { } @ Test public void testGeoFromFarAwayLocation ( ) throws Exception { } @ Test public void testGeoFromNearbyLocation ( ) throws Exception { } @ Test public void testGeoFromMultipleLocations ( ) throws Exception { } @ Test public void testPointPaging ( ) throws Exception { } @ Test public void testSamePointPaging ( ) throws Exception { } @ Test public void testDistanceByLimit ( ) throws Exception { } @ Test public void testGeoWithIntersection ( ) throws Exception { } @ Test public void testDenseSearch ( ) throws Exception { } private EntityManager loadGeolocationTestEntities ( ) throws Exception { } public Map < String , Object > getLocation ( double latitude , double longitude ) throws Exception { } public void updatePos ( EntityManager em , EntityRef entity , double latitude , double longitude ) throws Exception { } public void setPos ( Map < String , Object > data , double latitude , double longitude ) { } }

Fix:
restaurantProps . put ( "location" , getLocation ( 37.779632 , ( - 122.395131 ) ) ) ;