@Override
	public void validate(Ingredient c) throws IngredientRepositoryException {
		Ingredient cat = getIngredient(c.getIngredientId());
		if(cat == null){
			throw new IngredientRepositoryException("Could not find ingredient with id"+c.getIngredientId());
		}
		for(int parent : c.getParentIngredients()){
			Ingredient parentCategory = getIngredient(parent);
			if(parentCategory == null){
				throw new IngredientRepositoryException("Could not find parent ingredient with id"+parent);
			}
		}
	}