void () { final Element element = new Element("temp"); new HighlightSeverity(HighlightSeverity.ERROR.myName, 500).writeExternal(element); HighlightSeverity newSeverity = new HighlightSeverity(element); assertEquals(500, newSeverity.myVal); }