### Question:
PlayerInfoExtra implements Serializable { public static PlayerInfoExtra from(Sc2Api.PlayerInfoExtra sc2ApiPlayerInfoExtra) { require("sc2api player info extra", sc2ApiPlayerInfoExtra); return new PlayerInfoExtra(sc2ApiPlayerInfoExtra); } private  PlayerInfoExtra(Sc2Api.PlayerInfoExtra sc2ApiPlayerInfoExtra); static PlayerInfoExtra from(Sc2Api.PlayerInfoExtra sc2ApiPlayerInfoExtra); PlayerInfo getPlayerInfo(); PlayerResult getPlayerResult(); Optional<Integer> getPlayerMatchMakingRating(); int getPlayerActionPerMinute(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test void throwsExceptionWhenSc2ApiPlayerInfoExtraIsNull() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> PlayerInfoExtra.from(nothing())) .withMessage("sc2api player info extra is required"); }
@Test void convertsAllFieldsFromSc2ApiPlayerInfoExtra() { assertThatAllFieldsAreConverted(PlayerInfoExtra.from(sc2ApiPlayerInfoExtra())); }
@Test void throwsExceptionWhenSc2ApiPlayerInfoDoesNotExist() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> PlayerInfoExtra.from(sc2ApiPlayerInfoExtraWithoutPlayerInfo())) .withMessage("player info is required"); }
@Test void throwsExceptionWhenSc2ApiPlayerApmDoesNotExist() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> PlayerInfoExtra.from(without( () -> sc2ApiPlayerInfoExtra().toBuilder(), Sc2Api.PlayerInfoExtra.Builder::clearPlayerApm).build())) .withMessage("player apm is required"); }