Drain the beans, boil in fresh water for 10 minutes, then simmer for about 30 minutes.
Soften the onion in oil, add the garlic and let them both brown slightly. Add the rest of the ingredients, the drained beans and enough water to cover. Cook with the lid on for about 1 hour. Serve cold.