code: public void titleEquals(double seconds, String expectedTitle) {
          double end = System.currentTimeMillis() + (seconds * 1000);
          try {
              WebDriverWait wait = new WebDriverWait(app.getDriver(), (long) seconds, DEFAULT_POLLING_INTERVAL);
              wait.until(ExpectedConditions.titleIs(expectedTitle));
              double timeTook = Math.min((seconds * 1000) - (end - System.currentTimeMillis()), seconds * 1000) / 1000;
              checkTitleEquals(expectedTitle, seconds, timeTook);
          } catch (TimeoutException e) {
              checkTitleEquals(expectedTitle, seconds, seconds);
          }
      }
docs: Waits up to the default wait time (5 seconds unless changed) for the provided title equals the actual title of the current page
  the application is on. This information will be logged and recorded, with
  a screenshot for traceability and added debugging support.
  
  @param seconds       the number of seconds to wait
  @param expectedTitle - the title to wait for