Ingredient { protected boolean hasProperty(String key) { return properties.containsKey(key); } Ingredient(String ingredientType, String domain);  Ingredient(String ingredientType); protected  Ingredient(Ingredient other); String getDomain(); String getIngredientType();  }
@Test public void testHasProperty_propertyDoesNotExist() { Ingredient ingredient = new Ingredient("TestIngredient", "A") {}; assertFalse(ingredient.hasProperty("foo")); }