Source:
public void georadius() { Map<String, GeoCoordinate> coordinateMap = new HashMap<String, GeoCoordinate>(); coordinateMap.put("Palermo", new GeoCoordinate(13.361389, 38.115556)); coordinateMap.put("Catania", new GeoCoordinate(15.087269, 37.502669)); jedis.geoadd("Sicily", coordinateMap); List<GeoRadiusResponse> members = jedis.georadius("Sicily", 15, 37, 200, GeoUnit.KM); assertEquals(2, members.size()); members = jedis.georadius("Sicily", 15, 37, 200, GeoUnit.KM, GeoRadiusParam.geoRadiusParam() .sortAscending()); assertEquals(2, members.size()); assertEquals("Catania", members.get(0).getMemberByString()); assertEquals("Palermo", members.get(1).getMemberByString()); members = jedis.georadius("Sicily", 15, 37, 200, GeoUnit.KM, GeoRadiusParam.geoRadiusParam() .sortAscending().count(1)); assertEquals(1, members.size()); members = jedis.georadius("Sicily", 15, 37, 200, GeoUnit.KM, GeoRadiusParam.geoRadiusParam() .sortAscending().count(1).withCoord().withDist().withHash()); assertEquals(1, members.size()); GeoRadiusResponse response = members.get(0); assertTrue(equalsWithinEpsilon(56.4413, response.getDistance())); assertTrue(equalsWithinEpsilon(15.087269, response.getCoordinate().getLongitude())); assertTrue(equalsWithinEpsilon(37.502669, response.getCoordinate().getLatitude())); assertEquals("3479447370796909", Long.toString(response.getScore())); members = jedis.georadius("Sicily", 15, 37, 200, GeoUnit.KM, GeoRadiusParam.geoRadiusParam() .sortAscending().count(1).withHash()); assertEquals(1, members.size()); response = members.get(0); assertEquals("3479447370796909", Long.toString(response.getScore())); }

Target:
public void georadius() { Map<String, GeoCoordinate> coordinateMap = new HashMap<String, GeoCoordinate>(); coordinateMap.put("Palermo", new GeoCoordinate(13.361389, 38.115556)); coordinateMap.put("Catania", new GeoCoordinate(15.087269, 37.502669)); jedis.geoadd("Sicily", coordinateMap); List<GeoRadiusResponse> members = jedis.georadius("Sicily", 15, 37, 200, GeoUnit.KM); assertEquals(2, members.size()); members = jedis.georadius("Sicily", 15, 37, 200, GeoUnit.KM, GeoRadiusParam.geoRadiusParam() .sortAscending()); assertEquals(2, members.size()); assertEquals("Catania", members.get(0).getMemberByString()); assertEquals("Palermo", members.get(1).getMemberByString()); members = jedis.georadius("Sicily", 15, 37, 200, GeoUnit.KM, GeoRadiusParam.geoRadiusParam() .sortAscending().count(1)); assertEquals(1, members.size()); members = jedis.georadius("Sicily", 15, 37, 200, GeoUnit.KM, GeoRadiusParam.geoRadiusParam() .sortAscending().count(1).withCoord().withDist().withHash()); assertEquals(1, members.size()); GeoRadiusResponse response = members.get(0); assertTrue(equalsWithinEpsilon(56.4413, response.getDistance())); assertTrue(equalsWithinEpsilon(15.087269, response.getCoordinate().getLongitude())); assertTrue(equalsWithinEpsilon(37.502669, response.getCoordinate().getLatitude())); assertEquals(3479447370796909L, response.getRawScore()); members = jedis.georadius("Sicily", 15, 37, 200, GeoUnit.KM, GeoRadiusParam.geoRadiusParam() .sortAscending().count(1).withHash()); assertEquals(1, members.size()); response = members.get(0); assertEquals(3479447370796909L, response.getRawScore()); }