Rémi Bernon : mf/tests: Move and split some helper code around.