@Test(expected = RuntimeException.class)
public void testLoad_throwsOnOptionalWithTypeAndParams() {

  String ingredients =
      String.join(
          "\n",
          "domain: 'test'",
          "ingredients:",
          "  - name: 'fooIngredient'",
          "    optionals:",
          "      - name: 'optional'",
          "        type: 'boolean'",
          "        params:",
          "          - name: 'param1",
          "            type: 'boolean'",
          "          - name: 'param2",
          "            type: 'string'");
  loader.load(toStream(ingredients));
}