@Test
public void testLoad_keyedIngredientWithDefaultKey() {

  String yaml =
      String.join(
          "\n",
          "domain: 'test'",
          "ingredients:",
          "  - name: 'ingredient'",
          "    keyed: true",
          "    defaultKey: required",
          "    required:",
          "      - name: required",
          "        type: string",
          "        default: foo");
  Cookbook cookbook = loader.load(toStream(yaml));
  assertTrue(cookbook.getIngredients().get(0).isKeyed());
  assertEquals("required", cookbook.getIngredients().get(0).getDefaultKey());
}