### Question:
PointI implements Sc2ApiSerializable<Common.PointI> { public static PointI from(Common.PointI sc2ApiPointI) { require("sc2api pointi", sc2ApiPointI); return new PointI(sc2ApiPointI); } private  PointI(Common.PointI sc2ApiPointI); private  PointI(int x, int y); static PointI from(Common.PointI sc2ApiPointI); static PointI of(int x, int y); @Override Common.PointI toSc2Api(); int getX(); int getY(); PointI add(PointI pointToAdd); PointI sub(PointI pointToSubtract); PointI div(int divBy); PointI mul(int mulBy); int dot(PointI b); double distance(PointI b); Point2d toPoint2d(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test void throwsExceptionWhenSc2ApiPointIIsNull() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> PointI.from(nothing())) .withMessage("sc2api pointi is required"); }
@Test void throwsExceptionWhenSc2ApiPointIDoesNotHaveX() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> PointI.from(Common.PointI.newBuilder().setY(POINT_Y).build())) .withMessage("x is required"); }
@Test void throwsExceptionWhenSc2ApiPointIDoesNotHaveY() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> PointI.from(Common.PointI.newBuilder().setX(POINT_X).build())) .withMessage("y is required"); }