@Test
public void testNearestFeaturesFromFeatureCollection() throws
                                                       Exception {

    // given a GeoPoint
    final GeoPoint geoPoint = new GeoPoint(47.225782d,
                                           -1.554476);
    // and a FeatureCollection to check
    final FeatureCollection featureCollection = new FeatureCollection();
    featureCollection.addFeature(new Feature("id1",
                                             createPoint(gf,
                                                         47.226468d,
                                                         -1.554996d)));
    featureCollection.addFeature(new Feature("id2",
                                             createPoint(gf,
                                                         47.226126d,
                                                         -1.554381d)));
    // when applying filter
    final List<Feature> filteredFeatures = getFilteredFeatures(geoPoint,
                                                               45d,
                                                               featureCollection);
    // then
    assertNotNull(filteredFeatures);
    assertEquals(1,
                 filteredFeatures.size());
    assertEquals(featureCollection.getFeature("id2"),
                 filteredFeatures.get(0));
}