test(affinities): fix unit tests