title: How to test method that runs async on main thread?
body: <p>I simply have a method:</p>
  
  <pre><code>func update(with process: PresentableProcess) {
      presentableProcess = process
      if isViewLoaded {
          DispatchQueue.main.async { [weak self] in
              //do something on the main thread
          }
      }
  }
  </code></pre>
  
  <p>And its test:</p>
  
  <pre><code>func testPreferredContentSizeWhenTitleExist() {
      let process = PresentableProcess(title: "title")
      sut.update(with: process)
  
      XCTAssertEqualWithAccuracy(sut.preferredContentSize, 95, accuracy: 10)
  }
  </code></pre>
  
  <p>It doesn't work, because it runs on the main thread. I would like to avoid adding completion block in <code>update(with)</code> to pass a test.</p>