Cook the beans with mineral water, skimming when necessary and always with little heat, ensuring that they boil gently. Salt when half cooked.
Put oil in a clay pot. Sauté the onion and when it begins to brown, add the garlic (carved), the ginger (a slice or a teaspoon if it is powdered) and the thyme. Sauté for a couple of minutes.
Add the mushrooms and sauté for about 5 minutes.
Strain the beans. Add them to the pan and continue cooking for about 10 minutes.
When serving, you can add a splash of oil.