void () { final MyElement element = getDomManager().getFileElement(createXmlFile(""), MyElement.class, "root").getRootElement(); myCallRegistry.clear(); assertNull(element.getXmlTag()); element.setValue(42); assertNotNull(element.getXmlTag()); assertEquals("42", element.getXmlTag().getValue().getText()); final DomElement element1 = element; myCallRegistry.putExpected(new DomEvent(element1, true)); myCallRegistry.putExpected(new DomEvent(element, false)); element.setValue((Integer)null); assertNull(element.getXmlTag()); assertEquals(null, element.getValue()); myCallRegistry.putExpected(new DomEvent(element, false)); myCallRegistry.assertResultsAndClear(); }