### Question:
MultiplayerOptions implements Serializable { public static MultiplayerOptionsSyntax multiplayerSetup() { return new Builder(); } private  MultiplayerOptions(Builder builder); static MultiplayerOptionsSyntax multiplayerSetup(); static MultiplayerOptions multiplayerSetupFor(int portStart, int playerCount); int getSharedPort(); PortSet getServerPort(); Set<PortSet> getClientPorts(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test void throwsExceptionWhenSharedPortIsNotSet() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> fullAccessTo(multiplayerSetup()).build()) .withMessage("shared port is required"); }
@Test void throwsExceptionWhenServerPortIsNotSet() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> fullAccessTo(multiplayerSetup().sharedPort(1)).build()) .withMessage("server port is required"); }
@Test void throwsExceptionWhenClientPortsAreEmpty() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> fullAccessTo(multiplayerSetup().sharedPort(1).serverPort(PortSet.of(1, 2))).build()) .withMessage("client port list is required"); }
@Test void throwsExceptionWhenSharedPortLowerThanOne() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> multiplayerSetup().sharedPort(0)) .withMessage("shared port must be greater than 0"); }