void () { doTest(true, true); DaemonCodeAnalyzerSettings settings = DaemonCodeAnalyzerSettings.getInstance(); boolean old = settings.isNextErrorActionGoesToErrorsFirst(); settings.setNextErrorActionGoesToErrorsFirst(true); try { int offset = getEditor().getCaretModel().getOffset(); new GotoNextErrorHandler(true).invoke(getProject(), getEditor(), getFile()); assertEquals(offset, getEditor().getCaretModel().getOffset()); } finally { settings.setNextErrorActionGoesToErrorsFirst(old); } }