@Test
public void testCreateMosaicMultiLevelImage() throws Exception {

    final MultiLevelImage image1 = createMultiLevelImage(1, 2);
    final MultiLevelImage image2 = createMultiLevelImage(2, 2);
    final MultiLevelImage image3 = createMultiLevelImage(3, 2);
    final MultiLevelImage image4 = createMultiLevelImage(4, 2);
    final MultiLevelImage image5 = createMultiLevelImage(5, 2);
    final MultiLevelImage mosaicImage = CameraImageMosaic.create(image1, image2, image3, image4, image5);
    assertNotNull(mosaicImage);
    assertEquals(50, mosaicImage.getWidth());
    assertEquals(100, mosaicImage.getHeight());
    assertEquals(2, mosaicImage.getModel().getLevelCount());
    final Raster dataL0 = mosaicImage.getImage(0).getData();
    for (int x = 0; x < mosaicImage.getImage(0).getWidth(); x++) {
        assertEquals(x / 10 + 1, dataL0.getSample(x, 0, 0));
    }
    final Raster dataL1 = mosaicImage.getImage(1).getData();
    for (int x = 0; x < mosaicImage.getImage(1).getWidth(); x++) {
        assertEquals(x / 5 + 1, dataL1.getSample(x, 0, 0));
    }
}