Added tests for the pairing algorithm: