I'm not sure if it's any help, but https://github.com/wordpress-mobile/WordPress-iOS/blob/develop/WordPress/WordPressTest/AsyncTestHelper.h