@Test
public void testBake_serializesPayload_ingredientWithOptional() {

  Dispatcher spy = setupDispatcherSpy("A");
  Ingredient ingredient = new Ingredient("IngredientWithOptional", "A") {};
  ingredient.setOptional("optional", false, true);
  oven.bake(Recipe.prepare(ingredient));
  verify(spy).dispatch(payloadJson("{\"IngredientWithOptional\":{\"optional\":true}}"));
}