@Test
public void testMissingAttributesOnFeatures() throws Exception {

    Map<String, Object> geojson = readResource("geojson.json");
    // the first feature is used to define schema for whole collection on retype
    // add a attribute that is only on the first feature to test if parsing fails
    // when following features _don't_ have all attributes defined in schema
    addAttrToFirstFeature(geojson);
    SimpleFeatureCollection original = createCollection(geojson);
    SimpleFeatureCollection retyped = new UserLayerWFSHelper().postProcess(original);
    try (SimpleFeatureIterator it = retyped.features()) {
        while (it.hasNext()) {
            SimpleFeature feature = it.next();
            assertEquals(6, feature.getAttributeCount());
        }
    }
}