void () { ImplicitUsageProvider.EP_NAME.getPoint().registerExtension(new ImplicitUsageProvider() { @Override public boolean isImplicitUsage(@NotNull PsiElement element) { return false; } @Override public boolean isImplicitRead(@NotNull PsiElement element) { return false; } @Override public boolean isImplicitWrite(@NotNull PsiElement element) { return false; } @Override public boolean isImplicitlyNotNullInitialized(@NotNull PsiElement element) { return element instanceof PsiField && ((PsiField)element).getName().startsWith("field"); } @Override public boolean isClassWithCustomizedInitialization(@NotNull PsiElement element) { return element instanceof PsiClass && Objects.equals(((PsiClass)element).getName(), "Instrumented"); } }, myFixture.getTestRootDisposable()); doTest(); }