    @Test
    public void testPreserveImageInfo() throws IOException {

        final Product product2 = ProductSubsetBuilder.createProductSubset(product, null, "subset", "");
        final Band band = product2.getBand(DUMMY_BAND1);
        final Band band2 = product2.getBand(DUMMY_BAND2);
        assertNotNull(band);
        assertNotNull(band2);

        final ImageInfo imageInfo = band.getImageInfo();
        final ImageInfo imageInfo2 = band2.getImageInfo();
        assertNotNull(imageInfo);
        assertNotNull(imageInfo2);

        testPalette(imageInfo.getColorPaletteDef(), new Color[]{Color.red, Color.green});
        testPalette(imageInfo2.getColorPaletteDef(), new Color[]{Color.blue, Color.black});
    }