Check my previous post. I've updated the syntax, it should work now. I made a mistake, I think I just woke up around that time, my bad..
Also,, that rawFoodName (between quotes) was just a parameter/placeholder, you should pass in the full name of the raw fish:
Sleep.sleepUntil(() -> !getInventory().contains("Raw tuna"), 120000);
Oh, and make sure the timeout is around 2 minutes, or else it'll try cooking again after 5 seconds.
If you cook a variety of food you could also do:
Sleep.sleepUntil(() -> !getInventory().contains("Raw tuna") && !getInventory().contains("Raw lobster"), 120000);