### Question:
ActionUiToggleAutocast implements Sc2ApiSerializable<Ui.ActionToggleAutocast> { public static ActionUiToggleAutocast from(Ui.ActionToggleAutocast sc2ApiActionToggleAutocast) { require("sc2api action ui toggle autocast", sc2ApiActionToggleAutocast); return new ActionUiToggleAutocast(sc2ApiActionToggleAutocast); } private  ActionUiToggleAutocast(Builder builder); private  ActionUiToggleAutocast(Ui.ActionToggleAutocast sc2ApiActionToggleAutocast); static ActionUiToggleAutocast from(Ui.ActionToggleAutocast sc2ApiActionToggleAutocast); static ActionUiToggleAutocastSyntax toggleAutocast(); @Override Ui.ActionToggleAutocast toSc2Api(); Ability getAbility(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test void throwsExceptionWhenSc2ApiActionUiToggleAutocastIsNull() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> ActionUiToggleAutocast.from(nothing())) .withMessage("sc2api action ui toggle autocast is required"); }
@Test void convertsSc2ApiActionUiToggleAutocastToActionUiToggleAutocast() { assertThatAllFieldsAreConverted(ActionUiToggleAutocast.from(sc2ApiActionUiToggleAutocast())); }