public static FeatureCollectionType make(Feature... features) throws IOException {
MemoryDataStore data = new MemoryDataStore();
data.createSchema(SAMPLES.getFlagType());
for (Feature f : features) {
data.addFeature((SimpleFeature) f);
}
FeatureSource<SimpleFeatureType, SimpleFeature> fs = data.getFeatureSource(SAMPLES.getFlagType().getName());
FeatureCollectionType fct = WfsFactory.eINSTANCE.createFeatureCollectionType();
addFeatureToCollection(fct, fs);