@Test
public void testGradientMagnitude() {

    GridCoverage  sourceCoverage = SST.view(GEOPHYSICS);
    GridCoverage  targetCoverage = (GridCoverage) processor.gradientMagnitude(sourceCoverage);
    RenderedImage sourceImage    = sourceCoverage.getRenderableImage(0,1).createDefaultRendering();
    RenderedImage targetImage    = targetCoverage.getRenderableImage(0,1).createDefaultRendering();
    Raster        sourceRaster   = sourceImage.getData();
    Raster        targetRaster   = targetImage.getData();
    assertNotSame(sourceCoverage,                                targetCoverage);
    assertNotSame(sourceImage,                                   targetImage);
    assertNotSame(sourceRaster,                                  targetRaster);
    assertSame   (sourceCoverage.getCoordinateReferenceSystem(), targetCoverage.getCoordinateReferenceSystem());
    assertEquals (sourceCoverage.getEnvelope(),                  targetCoverage.getEnvelope());
    assertEquals (sourceCoverage.getGridGeometry(),              targetCoverage.getGridGeometry());
    assertEquals (sourceRaster  .getMinX(),                      targetRaster  .getMinX());
    assertEquals (sourceRaster  .getMinY(),                      targetRaster  .getMinY());
    assertEquals (sourceRaster  .getWidth(),                     targetRaster  .getWidth());
    assertEquals (sourceRaster  .getHeight(),                    targetRaster  .getHeight());
    assertEquals (0, sourceRaster.getMinX());
    assertEquals (0, sourceRaster.getMinY());
    assertEquals ("GradientMagnitude", ((OperationNode) targetImage).getOperationName());
    assertEquals(3.95f, targetRaster.getSampleFloat(304, 310, 0), 1E-2f);
    assertEquals(1.88f, targetRaster.getSampleFloat(262, 357, 0), 1E-2f);
    if (SHOW) {
        show(targetCoverage);
    }
}