### Question:
AvailableAbilities implements Serializable, GeneralizableAbility<AvailableAbilities> { public static AvailableAbilities from(Query.ResponseQueryAvailableAbilities sc2ApiResponseQueryAvailableAbilities) { require("sc2api response query available abilities", sc2ApiResponseQueryAvailableAbilities); return new AvailableAbilities(sc2ApiResponseQueryAvailableAbilities); } private  AvailableAbilities(Query.ResponseQueryAvailableAbilities sc2ApiResponseQueryAvailableAbilities); private  AvailableAbilities(Set<AvailableAbility> abilities, Tag unitTag, UnitType unitType); static AvailableAbilities from(Query.ResponseQueryAvailableAbilities sc2ApiResponseQueryAvailableAbilities); Set<AvailableAbility> getAbilities(); Tag getUnitTag(); UnitType getUnitType(); @Override AvailableAbilities generalizeAbility(UnaryOperator<Ability> generalize); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test void throwsExceptionWhenSc2ApiAvailableAbilitiesIsNull() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> AvailableAbilities.from(nothing())) .withMessage("sc2api response query available abilities is required"); }
@Test void convertsAllFieldsFromSc2ApiAvailableAbilities() { assertThatAllFieldsAreConverted(AvailableAbilities.from(sc2ApiAvailableAbilities())); }
@Test void throwsExceptionWhenUnitTagIsNotProvided() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> AvailableAbilities.from(without( () -> sc2ApiAvailableAbilities().toBuilder(), Query.ResponseQueryAvailableAbilities.Builder::clearUnitTag).build())) .withMessage("unit tag is required"); }
@Test void throwsExceptionWhenUnitTypeIsNotProvided() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> AvailableAbilities.from(without( () -> sc2ApiAvailableAbilities().toBuilder(), Query.ResponseQueryAvailableAbilities.Builder::clearUnitTypeId).build())) .withMessage("unit type is required"); }