void (@NotNull CodeStyleSettings expected, @NotNull CodeStyleSettings settings) { if (!expected.equals(settings)) { Element oldS = new Element("temp"); expected.writeExternal(oldS); Element newS = new Element("temp"); settings.writeExternal(newS); String newString = JDOMUtil.writeElement(newS); String oldString = JDOMUtil.writeElement(oldS); Assert.assertEquals("Code style settings damaged", oldString, newString); } }