void () { LinkedHashMap<String, Serializable> map = new LinkedHashMap<>(3); map.put("initial", """ <root xmlns:ns="http://ns.com" attr2="value2" attr1="value1" attr3="value3"/>"""); map.put("expected", """ <root attr1="value1" attr2="value2" attr3="value3" xmlns:ns="http://ns.com"/>"""); map.put("rules", new ArrayList<>( Arrays.asList(ruleWithOrder(BY_NAME, nameRule(".*"))))); doTest(map); }