void () { ProgressIndicatorEx ui = new ProgressIndicatorBase(); ProgressIndicatorEx indicator = new ProgressIndicatorBase(); indicator.pushState(); indicator.addStateDelegate(new RelayUiToDelegateIndicator(ui)); indicator.popState(); // should not cause NPE }