void () { Registry.getInstance().reset(); { Map<String, String> map = populateMap(Comparator.naturalOrder(), "value"); Element state2load = registryElementFromMap(map); Registry.loadState(state2load, null); assertEquals(JDOMUtil.writeElement(state2load), JDOMUtil.writeElement(Registry.getInstance().getState())); } // load state with elements reversed Registry.loadState(registryElementFromMap(populateMap(Comparator.reverseOrder(), "AnotherValue1111")), null); assertEquals(JDOMUtil.writeElement(registryElementFromMap(populateMap(Comparator.naturalOrder(), "AnotherValue1111"))), JDOMUtil.writeElement(Registry.getInstance().getState())); }