### Question:
DebugText implements Sc2ApiSerializable<Debug.DebugText> { public static DebugTextSyntax text() { return new Builder(); } private  DebugText(Builder builder); static DebugTextSyntax text(); @Override Debug.DebugText toSc2Api(); Color getColor(); Optional<Integer> getSize(); String getText(); Optional<Point> getPoint3d(); Optional<Point> getPoint2d(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test void throwsExceptionWhenColorIsNotSet() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> fullAccessTo(text().of(DEBUG_TEXT)).withColor(nothing()).build()) .withMessage("color is required"); }
@Test void throwsExceptionWhenTextIsNotSet() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> fullAccessTo(text()).withColor(SAMPLE_COLOR).build()) .withMessage("text is required"); }
@Test void throwsExceptionWhenPointIsNotInValidRange() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> text().of(DEBUG_TEXT).on(Point.of(-1, 1)).build()) .withMessage("virtualized point 2d [x] has value -1.0 and is lower than 0.0"); assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> text().of(DEBUG_TEXT).on(Point.of(1.1f, 1)).build()) .withMessage("virtualized point 2d [x] has value 1.1 and is greater than 1.0"); assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> text().of(DEBUG_TEXT).on(Point.of(1.0f, -1)).build()) .withMessage("virtualized point 2d [y] has value -1.0 and is lower than 0.0"); assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> text().of(DEBUG_TEXT).on(Point.of(1.0f, 1.1f)).build()) .withMessage("virtualized point 2d [y] has value 1.1 and is greater than 1.0"); }