private static void sleep(long duration) {
    try {
      Thread.sleep(duration);
    } catch (InterruptedException e) {
      throw new RuntimeException(e);
    }
  }
Wait for the callable to return either "not null" or "true". Exceptions are caught and only
rethrown if we time out.

@param until Condition that we're waiting for.
@param duration How long to wait.
@param in Unit in which duration is measured.
@return Whatever the condition returns.
selendroid-client/src/main/java/io/selendroid/client/waiter/TestWaiter.java