public void testAttributeFilters() throws Exception {
OGRDataStore s = new OGRDataStore(getAbsolutePath(STATE_POP), null, null, ogr);
FeatureSource fs = s.getFeatureSource(s.getTypeNames()[0]);
// equality filter
FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
Filter f = ff.equal(ff.property("STATE_NAME"), ff.literal("New York"), true);
assertEquals(1, fs.getFeatures(f).size());
// greater than
f = ff.greater(ff.property("PERSONS"), ff.literal(10000000));
assertEquals(6, fs.getFeatures(f).size());
// mix in a filter that cannot be encoded
f = ff.and(f, ff.like(ff.property("STATE_NAME"), "C*"));
assertEquals(1, fs.getFeatures(f).size());
}