public void testFidFilters() throws Exception {
final DataStore ds = testData.getDataStore();
final String typeName = testData.getTempTableName();
// grab some fids
FeatureReader<SimpleFeatureType, SimpleFeature> reader = ds.getFeatureReader(new Query(
typeName), Transaction.AUTO_COMMIT);
List<FeatureId> fids = new ArrayList<FeatureId>();
while (reader.hasNext()) {
fids.add(ff.featureId(reader.next().getID()));
// skip one
if (reader.hasNext()) {
reader.next();
}
}
reader.close();
Id filter = ff.id(new HashSet<FeatureId>(fids));
SimpleFeatureSource source = ds.getFeatureSource(typeName);
Query query = new Query(typeName, filter);
SimpleFeatureCollection results = source.getFeatures(query);
assertEquals(fids.size(), results.size());
SimpleFeatureIterator iterator = results.features();
try {