@Test
public void testRequestOutsideBounds() throws IOException, MismatchedDimensionException,
        NoSuchAuthorityCodeException {

    // grab the reader
    final URL testFile = TestData.getResource(this, "goodpyramid/"+TEST_FILE);
    assertNotNull(testFile);
    final ImagePyramidReader reader = new ImagePyramidReader(testFile, new Hints(
            Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, Boolean.FALSE));
    assertNotNull(reader);
    
    // prepare a request that crosses the bounds for a really minimal part
    GeneralEnvelope ge = reader.getOriginalEnvelope();
    ReferencedEnvelope requestedEnvelope = new ReferencedEnvelope(ge.getMinimum(0) - 5, ge.getMinimum(0), 
            ge.getMinimum(1), ge.getMaximum(1), ge.getCoordinateReferenceSystem());
    final Parameter<GridGeometry2D> readGG = new Parameter<GridGeometry2D>(AbstractGridFormat.READ_GRIDGEOMETRY2D);
    readGG.setValue(new GridGeometry2D(new GridEnvelope2D(0, 0, 400, 400), requestedEnvelope));
    
    // make sure we get back a null, not an exception
    assertNull(reader.read(new GeneralParameterValue[] {readGG}));
}