### Question:
Color implements Sc2ApiSerializable<Debug.Color> { public static Color of(int r, int g, int b) { return new Color(r, g, b); } private  Color(int r, int g, int b); static Color of(int r, int g, int b); @Override Debug.Color toSc2Api(); int getR(); int getG(); int getB(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static final Color WHITE; static final Color RED; static final Color GREEN; static final Color YELLOW; static final Color BLUE; static final Color TEAL; static final Color PURPLE; static final Color BLACK; static final Color GRAY; }### Answer:
@Test void throwsExceptionWhenColorIsNotInValidRange() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> Color.of(-1, 1, 1)) .withMessage("color [r] has value -1 and is lower than 0"); assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> Color.of(256, 1, 1)) .withMessage("color [r] has value 256 and is greater than 255"); assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> Color.of(1, -1, 1)) .withMessage("color [g] has value -1 and is lower than 0"); assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> Color.of(1, 256, 1)) .withMessage("color [g] has value 256 and is greater than 255"); assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> Color.of(1, 1, -1)) .withMessage("color [b] has value -1 and is lower than 0"); assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> Color.of(1, 1, 256)) .withMessage("color [b] has value 256 and is greater than 255"); }