### Question:
AvailableAbility implements Serializable, GeneralizableAbility<AvailableAbility> { public static AvailableAbility from(Common.AvailableAbility sc2ApiAvailableAbility) { require("sc2api available ability", sc2ApiAvailableAbility); return new AvailableAbility(sc2ApiAvailableAbility); } private  AvailableAbility(Common.AvailableAbility sc2ApiAvailableAbility); private  AvailableAbility(Ability ability, boolean requiresPoint); static AvailableAbility from(Common.AvailableAbility sc2ApiAvailableAbility); Ability getAbility(); boolean isRequiresPoint(); @Override AvailableAbility generalizeAbility(UnaryOperator<Ability> generalize); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test void throwsExceptionWhenSc2ApiAvailableAbilityIsNull() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> AvailableAbility.from(nothing())) .withMessage("sc2api available ability is required"); }
@Test void convertsAllFieldsFromSc2ApiAvailableAbility() { assertThatAllFieldsAreConverted(AvailableAbility.from(sc2ApiAvailableAbility())); }
@Test void throwsExceptionWhenAbilityIdIsNotProvided() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> AvailableAbility.from(without( () -> sc2ApiAvailableAbility().toBuilder(), Common.AvailableAbility.Builder::clearAbilityId).build())) .withMessage("ability is required"); }