public void testCreateIndexed() {
    byte[] redLUT = new byte[] {1, 10};
    byte[] greenLUT = new byte[] {2, 20};
    byte[] blueLUT = new byte[] {3, 30};
    byte[] alphaLUT = new byte[] {4, 40};

    ImageTypeSpecifier type =
        ImageTypeSpecifier.createIndexed(
            redLUT, greenLUT, blueLUT, alphaLUT, 1, DataBuffer.TYPE_BYTE);
    ColorModel model = type.getColorModel();

    assertEquals(
        "Failed to return the colorspace", ColorSpace.TYPE_RGB, model.getColorSpace().getType());
    assertEquals(
        "Failed to return the transparency", Transparency.TRANSLUCENT, model.getTransparency());
    assertEquals(
        "Failed to return the tranfer type", DataBuffer.TYPE_BYTE, model.getTransferType());
    assertEquals("Failed to return the red color component", 1, model.getRed(0));
    assertEquals("Failed to return the red color component", 10, model.getRed(1));
    assertEquals("Failed to return the green color component", 2, model.getGreen(0));
    assertEquals("Failed to return the green color component", 20, model.getGreen(1));
    assertEquals("Failed to return the blue color component", 3, model.getBlue(0));
    assertEquals("Failed to return the blue color component", 30, model.getBlue(1));
    assertEquals("Failed to return the alpha color component", 4, model.getAlpha(0));
    assertEquals("Failed to return the alpha color component", 40, model.getAlpha(1));
  }