void () { PsiFile psiFile = loadToPsiFile(getTestName(false) + ".java"); assertNotNull(psiFile); PsiClass psiClass = PsiTreeUtil.getParentOfType(psiFile.findElementAt(myFixture.getCaretOffset()), PsiClass.class); assertNotNull(psiClass); // call augmentprovider first time final PsiMethod[] psiClassMethods = psiClass.getMethods(); assertEquals(8, psiClassMethods.length); // change something to trigger cache drop WriteCommandAction.writeCommandAction(getProject(), psiFile).compute(() -> { psiClass.getModifierList().addAnnotation("java.lang.SuppressWarnings"); return true; } ); // call augment provider second time final PsiMethod[] psiClassMethods2 = psiClass.getMethods(); assertArrayEquals(psiClassMethods, psiClassMethods2); }