void () { myFileTypeManager.getRemovedMappingTracker().add(new ExtensionFileNameMatcher("xxx"), MyTestFileType.NAME, true); WriteAction.run(() -> myFileTypeManager.setPatternsTable( new HashSet<>(myFileTypeManager.getRegisteredFileTypeWithDescriptors()), myFileTypeManager.getExtensionMap().copy())); assertEquals(1, myFileTypeManager.getRemovedMappingTracker().getRemovedMappings().size()); myFileTypeManager.getRemovedMappingTracker().clear(); }