@Test public void testPlanarImageTranslatedChild() throws Exception { SampleModel sm = new ComponentSampleModel(DataBuffer.TYPE_BYTE, 128, 128, 1, 128, new int[] {0}); TiledImage source = new TiledImage(0, 0, 512, 512, 0, 0, sm, PlanarImage.createColorModel(sm)); Raster[] tiles = source.getTiles(); assertEquals(16, tiles.length); // Without fix for GEOS-8137, this split call will cause a // java.lang.ClassCastException: java.awt.image.Raster cannot be cast to // java.awt.image.WritableRaster MetatileMapOutputFormat.split(key, source); } }