The self.tests and self.theConvertersByName is always nil in original codes, because [nil setByAddingObject] returns nil, [nil mutableCopy] return nil. That cause the customized convert function will not be invoked.
The fix is quite simple, create a instance of NSSet and NSDictionary make it works. However, I think the better patch is use NSMutableSet and NSMutableDictionary, which allow us add more objects without copy it.
The self.tests and self.theConvertersByName is always nil in original codes, because [nil setByAddingObject] returns nil, [nil mutableCopy] return nil. That cause the customized convert function will not be invoked.
The fix is quite simple, create a instance of NSSet and NSDictionary make it works. However, I think the better patch is use NSMutableSet and NSMutableDictionary, which allow us add more objects without copy it.