@Test
public void testBake_serializesPayload_ingredientWithRepeatableCompoundOptional() {

  Dispatcher spy = setupDispatcherSpy("A");
  Ingredient ingredient = new Ingredient("IngredientWithRepeatableCompoundOptional", "A") {};
  ingredient.setCompoundOptional("optional", true, "a", 1, "b", "foo");
  ingredient.setCompoundOptional("optional", true, "a", -1, "b", "bar");
  oven.bake(Recipe.prepare(ingredient));
  verify(spy)
      .dispatch(
          payloadJson(
              "{\"IngredientWithRepeatableCompoundOptional\":{\"optional\":[{\"a\":1,\"b\":\"foo\"},{\"a\":-1,\"b\":\"bar\"}]}}"));
}