public static <V> V runOnMainSyncWithTimeout(Callable<V> callable) {
    try {
      return runOnMainSyncWithTimeoutAndWithCheckedExceptionsExpected(callable);
    } catch (RuntimeException e) {
      throw e;
    } catch (Exception e) {
      throw new RuntimeException("Unexpected checked exception", e);
    }
  }
Invokes the provided {@link Callable} on the main thread and blocks until the operation
completes or times out. If this method is invoked on the main thread, the {@code Callable} is
invoked immediately and no timeout is enforced.

<p>Exceptions thrown by the {@code Callable} are rethrown by this method. Checked exceptions
are rethrown as unchecked exceptions.

@return result returned by the {@code Callable}.
javatests/com/google/android/apps/authenticator/testing/TestUtilities.java