@Test
public void testBake_serializesPayload_ingredientWithCompoundOptional() {

  Dispatcher spy = setupDispatcherSpy("A");
  Ingredient ingredient = new Ingredient("IngredientWithCompoundOptional", "A") {};
  ingredient.setCompoundOptional("optional", false, "a", 1, "b", "foo");
  oven.bake(Recipe.prepare(ingredient));
  verify(spy)
      .dispatch(
          payloadJson(
              "{\"IngredientWithCompoundOptional\":{\"optional\":{\"a\":1,\"b\":\"foo\"}}}"));
}