void () { int todosInIndex = TodoCacheManager.getInstance(getProject()).getTodoCount(getVFile(), TodoIndexPatternProvider.getInstance()); int todosInHighlighting = PsiTodoSearchHelper.getInstance(getProject()).findTodoItems(getFile()).length; assertEquals("Mismatch between todos in index and highlighting", todosInIndex, todosInHighlighting); }