Add tests for `egal` and fix issue with pairs