### Question:
PortSet implements Sc2ApiSerializable<Sc2Api.PortSet> { public static PortSet of(int gamePort, int basePort) { if (!portIsValid(gamePort) || !portIsValid(basePort)) throw new IllegalArgumentException("port must be greater than 0"); return new PortSet(gamePort, basePort); } private  PortSet(int gamePort, int basePort); static PortSet of(int gamePort, int basePort); @Override Sc2Api.PortSet toSc2Api(); int getGamePort(); int getBasePort(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test void throwsExceptionWhenPortIsLowerThanOne() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> PortSet.of(0, 1)) .withMessage("port must be greater than 0"); assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> PortSet.of(1, 0)) .withMessage("port must be greater than 0"); }