@Test
public void testTooManyAttributesOnFeatures() throws Exception {

    Map<String, Object> geojson = readResource("geojson.json");
    // the first feature is used to define schema for whole collection on retype
    // remove an attribute from the _first_ feature to test if parsing fails
    // when following features have _more_ attributes than defined in schema
    dropAttrFromFirstFeature(geojson);
    SimpleFeatureCollection original = createCollection(geojson);
    SimpleFeatureCollection retyped = new UserLayerWFSHelper().postProcess(original);
    try (SimpleFeatureIterator it = retyped.features()) {
        while (it.hasNext()) {
            SimpleFeature feature = it.next();
            assertEquals(4, feature.getAttributeCount());
        }
    }
}