@Test
public void singleLShapedRegion() throws Exception {

    final float[][] DATA = {
        {0, 0, 0, 0, 0},
        {0, 1, 0, 0, 0},
        {0, 1, 1, 1, 0},
        {0, 0, 0, 0, 0}
    };
    GridCoverage2D cov = covFactory.create(
            "coverage",
            DATA,
            new ReferencedEnvelope(0, DATA[0].length, 0, DATA.length, null));
    Set<Double> outsideValues = Collections.singleton(0D);
    SimpleFeatureCollection fc = process.execute(cov, 0, Boolean.TRUE, null, null, null, null);
    assertEquals(1, fc.size());
    
    SimpleFeature feature = fc.features().next();
    int value = ((Number) feature.getAttribute("value")).intValue();
    assertEquals(1, value);
}