void (@NotNull PluginDescriptor oldDescriptor, @NotNull PluginDescriptor newDescriptor, boolean expectedResolveToNew, boolean expectedApprove) { FileType oldFileType = createFakeType("old"); FileType newFileType = createFakeType("new"); ExtensionFileNameMatcher matcher = new ExtensionFileNameMatcher("wow"); ConflictingFileTypeMappingTracker.ResolveConflictResult result; FileTypeManagerImpl.FileTypeWithDescriptor oldFtd = new FileTypeManagerImpl.FileTypeWithDescriptor(oldFileType, oldDescriptor); FileTypeManagerImpl.FileTypeWithDescriptor newFtd = new FileTypeManagerImpl.FileTypeWithDescriptor(newFileType, newDescriptor); result = ConflictingFileTypeMappingTracker.resolveConflict(matcher, oldFtd, newFtd); assertSame(expectedResolveToNew ? newFileType : oldFileType, result.resolved().fileType); assertEquals(expectedApprove, result.approved()); }