void () { final String extension = "very_rare_extension"; FileType idl = Objects.requireNonNull(myFileTypeManager.findFileTypeByName("IDL")); WriteAction.run(() -> myFileTypeManager.associatePattern(idl, "*." + extension)); Element element = myFileTypeManager.getState(); WriteAction.run(() -> myFileTypeManager.removeAssociatedExtension(idl, extension)); reInitFileTypeManagerComponent(element); FileType extensions = myFileTypeManager.getFileTypeByExtension(extension); assertEquals("IDL", extensions.getName()); WriteAction.run(() -> myFileTypeManager.removeAssociatedExtension(idl, extension)); }