void () { final RootInterface element = createElement("", RootInterface.class); final MyElement child1 = element.addChild(); child1.getAttr().setValue(555); final MyElement child2 = element.addChild(); child2.getAttr().setValue(777); final GenericDomValue<MyElement> resolve = child2.getResolve(); resolve.setStringValue("777"); assertEquals(child2, resolve.getValue()); resolve.setValue(child1); assertEquals("555", resolve.getStringValue()); assertEquals(child1, resolve.getValue()); resolve.setStringValue("239"); assertNull(resolve.getValue()); final GenericDomValue<MyElement> resolve2 = child2.getResolve2(); resolve2.setStringValue("777"); assertEquals(child2, resolve2.getValue()); }