@Test
public void testPreserveSuperimposed() throws ProcessException, TransformException {

    ReferencedEnvelope bounds = new ReferencedEnvelope(0, 10, 0, 10, DefaultGeographicCRS.WGS84);
    
    // Simple dataset with some coincident points
    Coordinate[] data = new Coordinate[] { new Coordinate(4, 4), new Coordinate(6.5, 6.5),
            new Coordinate(6.5, 6.5), new Coordinate(8, 8), new Coordinate(8.3, 8.3) };
    
    
    SimpleFeatureCollection fc = createPoints(data, bounds);
    ProgressListener monitor = null;
    PointStackerProcess psp = new PointStackerProcess();
    SimpleFeatureCollection result = psp.execute(fc, 100, // cellSize
            true, // normalize
            PreserveLocation.Superimposed, // preserve location
            bounds, // outputBBOX
            1000, // outputWidth
            1000, // outputHeight
            monitor);
    
    checkSchemaCorrect(result.getSchema(), true);
    assertEquals(3, result.size());
    checkStackedPoint(new Coordinate(4, 4), 1, 1, getResultPoint(result, new Coordinate(4, 4)));
    checkStackedPoint(new Coordinate(6.5, 6.5), 2, 1, getResultPoint(result, new Coordinate(6.5, 6.5)));
    checkStackedPoint(null, 2, 2, getResultPoint(result, new Coordinate(8, 8)));
}