Color implements Serializable { public static Color makeColor(PdfColorSpace colorSpace) { return makeColor(colorSpace, null); } protected  Color(PdfColorSpace colorSpace, float[] colorValue); static Color makeColor(PdfColorSpace colorSpace); static Color makeColor(PdfColorSpace colorSpace, float[] colorValue); static DeviceRgb convertCmykToRgb(DeviceCmyk cmykColor); static DeviceCmyk convertRgbToCmyk(DeviceRgb rgbColor); int getNumberOfComponents(); PdfColorSpace getColorSpace(); float[] getColorValue(); void setColorValue(float[] value); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void nullColorSpaceTest() { expectedException.expect(PdfException.class); expectedException.expectMessage("Unknown color space."); float[] colorValues = new float[]{0.0f, 0.5f, 0.1f}; Color color = Color.makeColor(null, colorValues); }
@Test public void unknownDeviceCsTest() { expectedException.expect(PdfException.class); expectedException.expectMessage("Unknown color space."); Color color = Color.makeColor(new CustomDeviceCs(null)); }
@Test public void unknownCieBasedCsTest() { expectedException.expect(PdfException.class); expectedException.expectMessage("Unknown color space."); Color color = Color.makeColor(new CustomPdfCieBasedCs(new PdfArray())); }
@Test public void unknownSpecialCsTest() { expectedException.expect(PdfException.class); expectedException.expectMessage("Unknown color space."); Color color = Color.makeColor(new CustomPdfSpecialCs(new PdfArray())); }