@Test public void setResultCallback_delay_shouldReturnSuccess() { TestResultCallback callback = new TestResultCallback(); result.setResultCallback(callback, 1000, TimeUnit.MILLISECONDS); assertThat(callback.getStatus().getStatusCode()).isEqualTo(Status.SUCCESS); }
@Override public void setResultCallback(@NonNull ResultCallback callback) { if (hasResult) { callback.onResult(generateStatus()); } }
SimplePendingResult extends PendingResult<Status> { @Override public void setResultCallback(@NonNull ResultCallback callback) { if (hasResult) { callback.onResult(generateStatus()); } } }
SimplePendingResult extends PendingResult<Status> { @Override public void setResultCallback(@NonNull ResultCallback callback) { if (hasResult) { callback.onResult(generateStatus()); } } SimplePendingResult(boolean hasResult); }
SimplePendingResult extends PendingResult<Status> { @Override public void setResultCallback(@NonNull ResultCallback callback) { if (hasResult) { callback.onResult(generateStatus()); } } SimplePendingResult(boolean hasResult); @NonNull @Override Status await(); @NonNull @Override Status await(long time, @NonNull TimeUnit timeUnit); @Override void cancel(); @Override boolean isCanceled(); @Override void setResultCallback(@NonNull ResultCallback callback); @Override void setResultCallback(@NonNull ResultCallback callback, long time,
      @NonNull TimeUnit timeUnit); }
SimplePendingResult extends PendingResult<Status> { @Override public void setResultCallback(@NonNull ResultCallback callback) { if (hasResult) { callback.onResult(generateStatus()); } } SimplePendingResult(boolean hasResult); @NonNull @Override Status await(); @NonNull @Override Status await(long time, @NonNull TimeUnit timeUnit); @Override void cancel(); @Override boolean isCanceled(); @Override void setResultCallback(@NonNull ResultCallback callback); @Override void setResultCallback(@NonNull ResultCallback callback, long time,
      @NonNull TimeUnit timeUnit);  }