@TestOnly
  public void waitForCompletion() {
    int idx = 0;
    while (!myUpdateAlarm.isDone() && idx++ < 10000) {
      try {
        myUpdateAlarm.get(1, TimeUnit.MILLISECONDS);
        return;
      }
      catch (TimeoutException ignore) {
      }
      catch (Exception e) {
        throw new RuntimeException(e);
      }
    }
  }
@TestOnly
  public void waitForCompletion()