void () { PsiFile[] files = myFixture.configureByFiles(getTestName(false) + ".json", "Schema.json"); JsonSchemaTestServiceImpl.setProvider(new JsonSchemaTestProvider(files[1].getVirtualFile(), getAvailabilityPredicate())); ServiceContainerUtil.replaceService(getProject(), JsonSchemaService.class, new JsonSchemaTestServiceImpl(getProject()), getTestRootDisposable()); Disposer.register(getTestRootDisposable(), new Disposable() { @Override public void dispose() { JsonSchemaTestServiceImpl.setProvider(null); } }); myFixture.enableInspections(SpellCheckingInspection.class); myFixture.checkHighlighting(true, false, true); }