@[ @{ @"id": @123, @"name": @"John Doe" }, @{ @"id": @124, @"name": @"Jane Doe" }, ]; // Stub AFNetworking AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; [AFHTTPRequestOperationManager stub:@selector(manager) andReturn:manager]; [[AFHTTPRequestOperationManager manager] stub:@selector(GET:parameters:success:failure:) withBlock:^id(NSArray *params) { // Get the success handler void (^success)(id _, id responseObject) = params[2]; // Call it with our JSON success(nil, mockJSON); return nil; // We don't care of what's returned }]; __block NSArray *response = nil; [Network getLatestResourcesWithCompletionHandler:^(NSArray *_) { response = _; }]; [[expectFutureValue([response.firstObject identifier]) shouldEventuallyBeforeTimingOutAfter(10)] equal:@123]; [[expectFutureValue([response.firstObject name]) shouldEventuallyBeforeTimingOutAfter(10)] equal:@"John Doe"]; });