@Test
    public void testFailDueToInvalidParams() {
        // min and max can't be < 0.
        assertThrows(
            IllegalArgumentException.class,
            () -> new SupportedVersionRange((short) -1, (short) -1));
        // min can't be < 0.
        assertThrows(
            IllegalArgumentException.class,
            () -> new SupportedVersionRange((short) -1, (short) 0));
        // max can't be < 0.
        assertThrows(
            IllegalArgumentException.class,
            () -> new SupportedVersionRange((short) 0, (short) -1));
        // min can't be > max.
        assertThrows(
            IllegalArgumentException.class,
            () -> new SupportedVersionRange((short) 2, (short) 1));
    }
Unit tests for the SupportedVersionRange class.
Along the way, this suite also includes extensive tests for the base class BaseVersionRange.
clients/src/test/java/org/apache/kafka/common/feature/SupportedVersionRangeTest.java