title: Using XCTest, how can one chain together multiple discrete sequences of { expectations -> wait }?
body: <p>The documentation for XCTest waitForExpectationsWithTimeout:handler:, states that </p>
  
  <blockquote>
    <p>Only one -waitForExpectationsWithTimeout:handler: can be active at any given time, but multiple discrete sequences of { expectations -> wait } can be chained together.</p>
  </blockquote>
  
  <p>However, I have no idea how to implement this, nor can I find any examples. I'm working on a class that first needs to find all available serial ports, pick the correct port and then connect to the device attached to that port. So, I'm working with at least two expectations, XCTestExpectation *expectationAllAvailablePorts and *expectationConnectedToDevice. How would I chain those two?</p>