First cut the beans and cook them in plenty of salted water for 15 to 20 minutes. Then strain the beans and put them in a bowl.
Prepare the brew in parallel or afterwards. To do this, dissolve salt, sugar and vinegar in fresh water and heat. Just before cooking, remove the stock from the stove and pour over the beans. Then add the quartered onions, bay leaves and mustard seeds. Then cover everything and let it steep for a few hours.