Fixing tests

HashSet needed to be LinkedHashSet to ensure order otherwise tests would
sometimes fail as expected results can change using hashset.