void () { ProgressIndicator pib = new ProgressIndicatorBase(); pib.cancel(); try { pib.checkCanceled(); fail("Please restore ProgressIndicatorBase.checkCanceled() check!"); } catch(ProcessCanceledException ex) { boolean hasStackFrame = ex.getStackTrace().length != 0; assertTrue("Should have stackframe", hasStackFrame); } }