void () { assertEquals('&', XmlUtil.getCharFromEntityRef("&amp;")); Disposable myRoot = Disposer.newDisposable(); DefaultLogger.disableStderrDumping(myRoot); try { XmlUtil.getCharFromEntityRef("&unknown;"); } catch (AssertionError ignore) { return; } finally { Disposer.dispose(myRoot); } fail("Exception should be thrown"); }