void () { FileType bundled = Objects.requireNonNull(myFileTypeManager.findFileTypeByName("Image")); // this check doesn't work because in unit test mode plugin class loader is not created //PluginDescriptor pluginDescriptor = PluginManager.getPluginByClass(bundled.getClass()); //assertTrue(pluginDescriptor.isBundled()); //LOG.debug("pluginDescriptor = " + pluginDescriptor); FileTypeBean bean = new FileTypeBean(); bean.name = new MyCustomImageFileType().getName(); String ext = myFileTypeManager.getAssociations(bundled).get(0).toString().replace("*.", ""); bean.extensions = ext; bean.implementationClass = MyCustomImageFileType.class.getName(); bean.setPluginDescriptor(new DefaultPluginDescriptor(PluginId.getId("myTestPlugin"), PluginManagerCore.getPlugin(PluginManagerCore.CORE_ID).getPluginClassLoader())); Disposable disposable = Disposer.newDisposable(); Disposer.register(getTestRootDisposable(), disposable); WriteAction.run(() -> FileTypeManagerImpl.EP_NAME.getPoint().registerExtension(bean, disposable)); assertInstanceOf(myFileTypeManager.findFileTypeByName(bean.name), MyCustomImageFileType.class); assertInstanceOf(myFileTypeManager.getFileTypeByExtension(ext), MyCustomImageFileType.class); WriteAction.run(() -> Disposer.dispose(disposable)); }