### Question:
Score implements Serializable { public static Score from(ScoreOuterClass.Score sc2ApiScore) { require("sc2api score", sc2ApiScore); return new Score(sc2ApiScore); } private  Score(ScoreOuterClass.Score sc2ApiScore); static Score from(ScoreOuterClass.Score sc2ApiScore); Type getType(); int getScore(); ScoreDetails getDetails(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test void throwsExceptionWhenSc2ApiScoreIsNull() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> Score.from(nothing())) .withMessage("sc2api score is required"); }
@Test void convertsAllFieldsFromSc2ApiScore() { assertThatAllFieldsAreConverted(Score.from(sc2ApiScore())); }
@Test void throwsExceptionWhenTypeIsNotProvided() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> Score.from(without( () -> sc2ApiScore().toBuilder(), ScoreOuterClass.Score.Builder::clearScoreType).build())) .withMessage("type is required"); }
@Test void throwsExceptionWhenScoreIsNotProvided() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> Score.from(without( () -> sc2ApiScore().toBuilder(), ScoreOuterClass.Score.Builder::clearScore).build())) .withMessage("score is required"); }
@Test void throwsExceptionWhenDetailsAreNotProvided() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> Score.from(without( () -> sc2ApiScore().toBuilder(), ScoreOuterClass.Score.Builder::clearScoreDetails).build())) .withMessage("details is required"); }
@Test void throwsExceptionWhenSc2ApiScoreTypeIsNotProvided() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> Score.Type.from(nothing())) .withMessage("sc2api score type is required"); }