### Question:
Point implements Sc2ApiSerializable<Common.Point> { public static Point from(Common.Point sc2ApiPoint) { require("sc2api point", sc2ApiPoint); return new Point(sc2ApiPoint); } private  Point(Common.Point sc2ApiPoint); private  Point(float x, float y, float z); static Point of(float x, float y); static Point of(float x, float y, float z); static Point from(Common.Point sc2ApiPoint); @Override Common.Point toSc2Api(); float getX(); float getY(); float getZ(); Point add(Point pointToAdd); Point sub(Point pointToSubtract); Point sub(float subX, float subY, float subZ); Point div(float divBy); Point mul(float mulBy); double distance(Point b); float dot(Point b); Point2d toPoint2d(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test void throwsExceptionWhenSc2ApiPointIsNull() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> Point.from(nothing())) .withMessage("sc2api point is required"); }
@Test void throwsExceptionWhenSc2ApiPointDoesNotHaveX() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> Point.from(Common.Point.newBuilder().setY(POINT_Y).setZ(POINT_Z).build())) .withMessage("x is required"); }
@Test void throwsExceptionWhenSc2ApiPointDoesNotHaveY() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> Point.from(Common.Point.newBuilder().setX(POINT_X).setZ(POINT_Z).build())) .withMessage("y is required"); }