@Test
public void testZoomlevel3() throws IOException {

    GeoPackageReader reader = new GeoPackageReader(getClass().getResource("world_lakes.gpkg"), null);
    
    GeneralParameterValue[] parameters = new GeneralParameterValue[1];
    GridGeometry2D gg = new GridGeometry2D(new GridEnvelope2D(new Rectangle(500,500)), new ReferencedEnvelope(0,45.0,-85.0,0,WGS_84));
    parameters[0] = new Parameter<GridGeometry2D>(AbstractGridFormat.READ_GRIDGEOMETRY2D, gg);
    GridCoverage2D gc = reader.read("World_Lakes", parameters);
    RenderedImage img = gc.getRenderedImage();
    assertEquals(0, gc.getEnvelope().getMinimum(0),0.01);
    assertEquals(-90, gc.getEnvelope().getMinimum(1),0.01);
    assertEquals(67.5, gc.getEnvelope().getMaximum(0),0.01);
    assertEquals(0, gc.getEnvelope().getMaximum(1),0.01);
    assertEquals(768, img.getWidth());
    assertEquals(1024, img.getHeight());
}