Soak the beans for at least 8-10 hours. Discard the soaking liquid. Cook the beans in a fresh pot of water until tender but still holding their shape. I do this in a pressure cooker to save time.
Slice the onion into slivers. Mix the onions and lemon juice with a pinch of salt in a bowl. Let it sit while you make the rest of the salad.
Chop the anchovies to a fine mince. Heat oil in a pan and add the anchovies. They will start to sizzle straight away. Move it around for 20-30 seconds, then add the tomatoes and chilli flakes. Season with a little more salt, then cover and cook until the tomatoes start to break down, about 5-7 mins.
Add the beans, olives and capers and toss everything together just to heat them through.
Take the pan off the heat and stir in the tuna and macerated onion slices and juice. Taste and adjust seasoning. Serve hot or at room temperature. Can be kept refrigerated for 2 days. Can be frozen without the tuna for up to a month.