Objective-C object factory for testing.