Rinse beans then soak at least 12 but even better 24 hours. Some like to discard the water, others have no problem using it for cooking.
Pour water and beans into a big enough pot. Add onion, garlic, black pepper, salt then put on a lid and bring it to boil. Reduce heat to simmer then cook the beans until gets soft in the inside, about 45 - 90 minutes, depends on the age of the beans. Take into account that the beans will also cook in sauce while cooling off.
Mix in vinegar and tomato paste. If no tomato paste is available, just make some by reducing tomato puree or freshly pureed tomato.
Mix corn starch with a bit of water then add it to the pot. Stir until it starts to thicken, adjust flavor with salt and black pepper. Remove the pot from heat and let it cool down then serve.