@Test
    void testFaultyConstructors() {
        final Color c0 = new Color(0xff0000ff);
        final Color c1 = new Color(0xff00ff00);

        // test the two-color variations
        assertThrows(IllegalArgumentException.class, () -> new PaletteEntryForRange(0.0f, 0.0f, c0, c1), "Constructor failed to detect invalid range");

        assertThrows(IllegalArgumentException.class, () -> new PaletteEntryForRange(0.0f, 1.0f, null, c1), "Constructor failed to detect null color");

        assertThrows(IllegalArgumentException.class, () -> new PaletteEntryForRange(0.0f, 1.0f, c0, null), "Constructor failed to detect invalid color");

        // test the one-color variations
        assertThrows(IllegalArgumentException.class, () -> new PaletteEntryForRange(0.0f, 0.0f, c0), "Constructor failed to detect invalid range");

        assertThrows(IllegalArgumentException.class, () -> new PaletteEntryForRange(0.0f, 1.0f, null), "Constructor failed to detect null color");
    }
Test of coversSingleEntry method, of class PaletteEntryForRange.
src/test/java/org/apache/commons/imaging/formats/tiff/photometricinterpreters/floatingpoint/PaletteEntryForRangeTest.java