Using Thread.Sleep to sleep N seconds can not ensure you can get the updated title although the test case with 2 seconds sleeping works well. So a common way to get an async result is to write a CallbackHelper for title change, see OnPageFinishedHelper and OnPageStartHelper. Their implementation uses a sync mechanism to block the thread execution until the onTitleChanged callback gets called, so that it is safe to get the title for verification.

You might need to implement `OnTitleChangedHelper` like
```
public OnTitleChangedHelper extends CallbackHelper {
  public String getChangedTitle() {
    ...
  }
}
```

and add a member into ```TestXWalkRuntimeClientContentsClient ```
```
private OnTitleChangedHelper onTitleChangedHelper = new OnTitleChangedHelper();
public OnTitleChangedHelper getOnTitleChangedHelper() {
   return onTitleChangedHelper;
}
```
With the above change, the Thread.Sleep for title update can be:
```
CallbackHelper titleChangedHelper = mTestContentsClient.getOnTitleChangedHelper();
int currentCallCount = titleChangedHelper .getCallCount();
onPause();
titleChangedHelper .waitForCallback(currentCallCount, 1, WAIT_TIMEOUT_SECONDS,  TimeUnit.SECONDS);
// Right now, it is safe to get the changed title from callback helper.
titleChangedHelper.getChangedTitle();
```