void (@NotNull ProgressIndicator indicator) { ModalityState state = indicator.getModalityState(); assertSame(state, ModalityState.defaultModalityState()); ApplicationManager.getApplication().invokeAndWait(() -> assertSame(state, ModalityState.defaultModalityState()), state); }