@Test
public void cloudExtractionSimplified() throws Exception {

    GeoTiffReader reader = null;
    FeatureIterator<SimpleFeature> iter = null;
    GridCoverage2D cov = null;
    try {
        reader = new GeoTiffReader(cloudFile);
        cov = reader.read(null);
        SimpleFeatureCollection fc = process.execute(cov, null, 10d, true, 4d, true, true,
                null, null);
        assertEquals(2, fc.size());
        iter = fc.features();
        // Getting the main Footprint
        SimpleFeature feature = iter.next();
        Geometry geometry = (Geometry) feature.getDefaultGeometry();
        double fullArea = geometry.getArea();
        // Getting to the simplified Footprint
        feature = (SimpleFeature) iter.next();
        geometry = (Geometry) feature.getDefaultGeometry();
        double simplifiedArea = geometry.getArea();
        // area are different and polygons are different too
        assertTrue(Math.abs(simplifiedArea - fullArea) > 0);
        assertFalse(referenceGeometry.equalsExact(geometry, TOLERANCE));
    } finally {
        if (iter != null) {
            iter.close();
        }
        if (reader != null) {
            try {
                reader.dispose();
            } catch (Throwable t) {
            }
        }
        if (cov != null) {
            try {
                cov.dispose(true);
            } catch (Throwable t) {
            }
        }
    }
}