void (@Nullable JBCefClient client) { JBCefBrowserBase browser = null; try { browser = new JCEFHtmlPanel(client, "about:blank"); } catch (RuntimeException ex) { fail("Exception occurred: " + ex.getMessage()); ex.printStackTrace(); } if (client == null) client = browser.getJBCefClient(); assertFalse(browser.isDisposed()); Disposer.dispose(client); assertTrue(browser.isDisposed()); }