### Question:
ChatReceived implements Serializable { public static ChatReceived from(Sc2Api.ChatReceived sc2ApiChatReceived) { require("sc2api chat received", sc2ApiChatReceived); return new ChatReceived(sc2ApiChatReceived); } private  ChatReceived(Sc2Api.ChatReceived sc2ApiChatReceived); static ChatReceived from(Sc2Api.ChatReceived sc2ApiChatReceived); int getPlayerId(); String getMessage(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test void throwsExceptionWhenSc2ApiChatReceivedIsNull() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> ChatReceived.from(nothing())) .withMessage("sc2api chat received is required"); }
@Test void convertsSc2ApiChatReceivedToChatReceived() { assertThatAllFieldsAreConverted(ChatReceived.from(sc2ApiChatReceived())); }
@Test void throwsExceptionWhenPlayerIdInNotProvided() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> ChatReceived.from(sc2ApiChatReceivedWithoutPlayerId())) .withMessage("player id is required"); }
@Test void throwsExceptionWhenMessageInNotProvided() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> ChatReceived.from(sc2ApiChatReceivedWithoutMessage())) .withMessage("message is required"); }