title: How to wait for method that has completion block (all on main thread)?
body: <p>I have the following (pseudo) code:</p>
  
  <pre><code>- (void)testAbc
  {
      [someThing retrieve:@"foo" completion:^
      {
          NSArray* names = @[@"John", @"Mary", @"Peter", @"Madalena"];
          for (NSString name in names)
          {
              [someObject lookupName:name completion:^(NSString* urlString)
              {
                  // A. Something that takes a few seconds to complete.
              }];
  
              // B. Need to wait here until A is completed.
          }
      }];
  
      // C. Need to wait here until all iterations above have finished.
      STAssertTrue(...);
  }
  </code></pre>
  
  <p>This code is running on main thread, and also the completion block A is on main thread.</p>
  
  <ul>
  <li>How do I wait at B for A to complete?</li>
  <li>How do subsequently wait at C for the outer completion block to complete?</li>
  </ul>