### Question:
BuffData implements Serializable { public static BuffData from(Data.BuffData sc2ApiBuffData) { require("sc2api buff data", sc2ApiBuffData); return new BuffData(sc2ApiBuffData); } private  BuffData(Data.BuffData sc2ApiBuffData); static BuffData from(Data.BuffData sc2ApiBuffData); Buff getBuff(); String getName(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test void throwsExceptionWhenSc2ApiBuffDataIsNull() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> BuffData.from(nothing())) .withMessage("sc2api buff data is required"); }
@Test void convertsAllFieldsFromSc2ApiUnit() { assertThatAllFieldsAreConverted(BuffData.from(sc2ApiBuffData())); }
@Test void throwsExceptionWhenBuffIsNotProvided() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> BuffData.from(without( () -> sc2ApiBuffData().toBuilder(), Data.BuffData.Builder::clearBuffId).build())) .withMessage("buff is required"); }
@Test void throwsExceptionWhenNameIsNotProvided() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> BuffData.from(without( () -> sc2ApiBuffData().toBuilder(), Data.BuffData.Builder::clearName).build())) .withMessage("name is required"); }