@Test
public void testRetype() throws Exception {

    Map<String, Object> geojson = readResource("geojson.json");
    SimpleFeatureCollection original = createCollection(geojson);
    SimpleFeature f = null;
    SimpleFeatureCollection retyped = new UserLayerWFSHelper().postProcess(original);
    try (SimpleFeatureIterator it = retyped.features()) {
        while (it.hasNext()) {
            SimpleFeature feature = it.next();
            if ("vuser_layer_data.2970316".equals(feature.getID())) {
                f = feature;
                break;
            }
        }
    }
    assertEquals(5, f.getAttributeCount());
    Property defaultGeometry = f.getDefaultGeometryProperty();
    Property interpoloi = f.getProperty("INTERPOLOI");
    Property lahdeainei = f.getProperty("LAHDEAINEI");
    Property id = f.getProperty("ID");
    Property laji = f.getProperty("LAJI");
    assertEquals(original.getSchema().getGeometryDescriptor().getName().getLocalPart(), defaultGeometry.getName().getLocalPart());
    assertEquals(MultiLineString.class, defaultGeometry.getType().getBinding());
    assertEquals(MultiLineString.class, defaultGeometry.getValue().getClass());
    assertEquals(Integer.class, interpoloi.getValue().getClass());
    assertEquals(1, interpoloi.getValue());
    assertEquals(String.class, lahdeainei.getValue().getClass());
    assertEquals("0", lahdeainei.getValue());
    assertEquals(Double.class, id.getValue().getClass());
    assertEquals(1.48627129E8, ((Double) id.getValue()).doubleValue(), 1e-8);
    assertEquals(String.class, laji.getValue().getClass());
    assertEquals("696", laji.getValue());
}