Fix test: replace HashMap with LinkedHashMap to assert ordering