void () { PsiClass psiClass = myFixture.addClass("class C {}"); List<String> hints = new ArrayList<>(); PsiAugmentProvider.EP_NAME.getPoint().registerExtension(new PsiAugmentProvider() { @Override protected @NotNull <Psi extends PsiElement> List<Psi> getAugments(@NotNull PsiElement element, @NotNull Class<Psi> type, @Nullable String nameHint) { if (element == psiClass) { hints.add(nameHint); } return Collections.emptyList(); } }, myFixture.getTestRootDisposable()); assertNotNull(psiClass.findFieldByName(AUGMENTED_FIELD, true)); assertNull(psiClass.findFieldByName("another", false)); assertSize(1, psiClass.getFields()); assertSize(2, psiClass.getAllFields()); assertOrderedEquals(hints, AUGMENTED_FIELD, "another", null); }