DRYed out Cocoa tests