I often find in my iPhone Objective-C unit tests that I want stub out a class method, e.g. NSUrlConnection\'s +sendSynchronousRequest:returningResponse:error: method.
Here is a nice 'gist' with a swizzle implementation for class methods: https://gist.github.com/314009