void () { myFixture.configureByText("Foo.java", "class Foo { String bar; }"); myFixture.testHighlighting(); Disposable disposable = Disposer.newDisposable(); FileType foo = FileTypeIndexTest.registerFakeFileType(getTestName(false), "test", disposable); String fooName = foo.getName(); Disposer.dispose(disposable); assertNull(FileTypeManager.getInstance().findFileTypeByName(fooName)); myFixture.configureByText("Bar.java", "class Bar { String bar; }"); myFixture.testHighlighting(); }