Saute the onion and garlic in the olive oil for a couple of minutes.
Add the beans and canned tomatoes and cook for another 1 or 2 minutes.
Pour over the water, add the sugar, season with salt and pepper.
Bring the liquid to the boil, reduce the heat, cover, and simmer for about 35 minutes.
Check the seasoning and add more salt if needed.
Remove from the heat and set aside to cool in the pan.
Transfer to a serving dish and serve with wedges of lemon to squeeze over.