void (final DomElement domElement) { assertNotNull(domElement); assertTrue(domElement.exists()); WriteCommandAction.writeCommandAction(null).run(() -> domElement.undefine()); assertFalse(domElement.exists()); }