### Question:
VitalScoreDetails implements Serializable { public static VitalScoreDetails from(ScoreOuterClass.VitalScoreDetails sc2ApiVitalScoreDetails) { require("sc2api vital score details", sc2ApiVitalScoreDetails); return new VitalScoreDetails(sc2ApiVitalScoreDetails); } private  VitalScoreDetails(ScoreOuterClass.VitalScoreDetails sc2ApiVitalScoreDetails); static VitalScoreDetails from(ScoreOuterClass.VitalScoreDetails sc2ApiVitalScoreDetails); float getLife(); float getShields(); float getEnergy(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test void throwsExceptionWhenSc2ApiVitalScoreDetailsIsNull() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> VitalScoreDetails.from(nothing())) .withMessage("sc2api vital score details is required"); }
@Test void convertsAllFieldsFromSc2ApiVitalScoreDetails() { assertThatAllFieldsAreConverted(VitalScoreDetails.from(sc2ApiVitalScoreDetails())); }
@Test void throwsExceptionWhenLifeIsNotProvided() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> VitalScoreDetails.from(without( () -> sc2ApiVitalScoreDetails().toBuilder(), ScoreOuterClass.VitalScoreDetails.Builder::clearLife).build())) .withMessage("life is required"); }
@Test void throwsExceptionWhenShieldsIsNotProvided() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> VitalScoreDetails.from(without( () -> sc2ApiVitalScoreDetails().toBuilder(), ScoreOuterClass.VitalScoreDetails.Builder::clearShields).build())) .withMessage("shields is required"); }
@Test void throwsExceptionWhenEnergyIsNotProvided() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> VitalScoreDetails.from(without( () -> sc2ApiVitalScoreDetails().toBuilder(), ScoreOuterClass.VitalScoreDetails.Builder::clearEnergy).build())) .withMessage("energy is required"); }