Fix test to work in an order independent manner