@SuppressWarnings("ConstantConditions") @Test public void isCancelled_ReturnsDelegateState() throws Exception { boolean expectedValue = true; when(wrappedCall.isCanceled()).thenReturn(expectedValue); boolean actualValue = testCall.isCanceled(); verify(wrappedCall).isCanceled(); assertEquals(actualValue, expectedValue); }
@Override public boolean isCanceled() { return delegate.isCanceled(); }
ScheduledCall implements Call<T> { @Override public boolean isCanceled() { return delegate.isCanceled(); } }
ScheduledCall implements Call<T> { @Override public boolean isCanceled() { return delegate.isCanceled(); } ScheduledCall(Call<T> delegate, Executor callbackExecutor); }
ScheduledCall implements Call<T> { @Override public boolean isCanceled() { return delegate.isCanceled(); } ScheduledCall(Call<T> delegate, Executor callbackExecutor); @Override T execute(); @Override void enqueue(final Callback<T> callback); @Override boolean isExecuted(); @Override void cancel(); @Override boolean isCanceled(); @SuppressWarnings("CloneDoesntCallSuperClone") // Performing deep clone. @Override ScheduledCall<T> clone(); }
ScheduledCall implements Call<T> { @Override public boolean isCanceled() { return delegate.isCanceled(); } ScheduledCall(Call<T> delegate, Executor callbackExecutor); @Override T execute(); @Override void enqueue(final Callback<T> callback); @Override boolean isExecuted(); @Override void cancel(); @Override boolean isCanceled(); @SuppressWarnings("CloneDoesntCallSuperClone") // Performing deep clone. @Override ScheduledCall<T> clone();  }