@Test
public void filterShouldReturnOnlyFeaturesWithFilterProperty() {

    ArrayList<Feature> featuresList = new ArrayList<>();
    featuresList.add(generateRandomFeatureWithProperties(new GeoJSONFeature.Property("sample-string", "efgh")
            , new GeoJSONFeature.Property("task-status", "positive")
            , new GeoJSONFeature.Property("position", 0)));
    featuresList.add(generateRandomFeatureWithProperties(new GeoJSONFeature.Property("sample-string", "defg")
            , new GeoJSONFeature.Property("position", 1)));
    featuresList.add(generateRandomFeatureWithProperties(new GeoJSONFeature.Property("sample-string", "abcd")
            , new GeoJSONFeature.Property("position", 2)));
    featuresList.add(generateRandomFeatureWithProperties(new GeoJSONFeature.Property("sample-string", "cdef")
            , new GeoJSONFeature.Property("task-status", "positive")
            , new GeoJSONFeature.Property("position", 3)));
    featuresList.add(generateRandomFeatureWithProperties(new GeoJSONFeature.Property("sample-string", "bcde")
            , new GeoJSONFeature.Property("task-status", "positive")
            , new GeoJSONFeature.Property("position", 4)));
    featuresList.add(generateRandomFeatureWithProperties(new GeoJSONFeature.Property("sample-string", "bcde")
            , new GeoJSONFeature.Property("task-status", "positive")
            , new GeoJSONFeature.Property("position", 5)));
    featuresList.add(generateRandomFeatureWithProperties(new GeoJSONFeature.Property("task-status", "positive")
            , new GeoJSONFeature.Property("position", 6)));
    FeatureCollection actualFeatureCollection = new FeatureFilter.Builder(FeatureCollection.fromFeatures(featuresList))
            .whereRegex("sample-string", "[a-zA-z]*")
            .whereRegex("task-status", "[a-zA-Z]*")
            .build()
            .filter();
    List<Feature> actualFeatures = actualFeatureCollection.features();
    Assert.assertEquals(4, actualFeatures.size());
    Assert.assertEquals(0, (int) actualFeatures.get(0).getNumberProperty("position"));
    Assert.assertEquals(3, (int) actualFeatures.get(1).getNumberProperty("position"));
    Assert.assertEquals(4, (int) actualFeatures.get(2).getNumberProperty("position"));
    Assert.assertEquals(5, (int) actualFeatures.get(3).getNumberProperty("position"));
}