fix unit tests by checking equality on sorted lists