@Test
public void rasterizePoints() throws Exception {

    ReferencedEnvelope bounds = new ReferencedEnvelope(-10, 10, -20, 20, DefaultEngineeringCRS.GENERIC_2D);
    Dimension gridDim = new Dimension(100, 100);
    
    SimpleFeatureCollection features = createPoints(bounds, gridDim);
    
    String covName = "Test";
    ProgressListener monitor = null;
    GridCoverage2D cov = VectorToRasterProcess.process(
            features, "value", gridDim, bounds, covName, monitor);
    
    SimpleFeatureIterator iter = features.features();
    int[] covValues = new int[1];
    try {
        while (iter.hasNext()) {
            SimpleFeature feature = iter.next();
            Coordinate coord = ((Geometry)feature.getDefaultGeometry()).getCoordinate();
            Point2D worldPos = new Point2D.Double(coord.x, coord.y);
            int value = (Integer) feature.getAttribute("value");
            
            cov.evaluate(worldPos, covValues);
            assertEquals(value, covValues[0]);
        }
    } finally {
        iter.close();
    }
    
}