added test for RandomPairing and made it work