Fix failure of tests due to random order of mongo search