@Test
public void testReprojected() throws NoSuchAuthorityCodeException, FactoryException, ProcessException, TransformException {

    ReferencedEnvelope inBounds = new ReferencedEnvelope(0, 10, 0, 10, DefaultGeographicCRS.WGS84);
    
    // Dataset with some points located in appropriate area
    // points are close enough to create a single cluster
    Coordinate[] data = new Coordinate[] { new Coordinate(-121.813201, 48.777343), new Coordinate(-121.813, 48.777) };
    
    
    SimpleFeatureCollection fc = createPoints(data, inBounds);
    ProgressListener monitor = null;
    // Google Mercator BBOX for northern Washington State (roughly)
    CoordinateReferenceSystem webMerc = CRS.decode("EPSG:3785");
    ReferencedEnvelope outBounds = new ReferencedEnvelope(-1.4045034049133E7, -1.2937920131607E7, 5916835.1504419, 6386464.2521607, webMerc);
    PointStackerProcess psp = new PointStackerProcess();
    SimpleFeatureCollection result = psp.execute(fc, 100, // cellSize
            null, // normalize
            null, // preserve location
            outBounds, // outputBBOX
            1810, // outputWidth
            768, // outputHeight
            monitor);
    
    checkSchemaCorrect(result.getSchema(), false);
    assertEquals(1, result.size());
    assertEquals(inBounds.getCoordinateReferenceSystem(), result.getBounds().getCoordinateReferenceSystem());
    checkResultPoint(result, new Coordinate(-121.813201, 48.777343), 2, 2, null, null);
}