@SuppressWarnings("ConstantConditions") @Test public void isCancelled_ReturnsDelegateState() throws Exception { boolean expectedValue = true; when(mockOkHttpCall.isCanceled()).thenReturn(expectedValue); boolean actualValue = testCall.isCanceled(); verify(mockOkHttpCall).isCanceled(); assertEquals(actualValue, expectedValue); }
@Override public boolean isCanceled() { return rawCall.isCanceled(); }
OkHttpCall implements Call<T> { @Override public boolean isCanceled() { return rawCall.isCanceled(); } }
OkHttpCall implements Call<T> { @Override public boolean isCanceled() { return rawCall.isCanceled(); } OkHttpCall(okhttp3.Call rawCall, ResponseAdapter<T> adapter); }
OkHttpCall implements Call<T> { @Override public boolean isCanceled() { return rawCall.isCanceled(); } OkHttpCall(okhttp3.Call rawCall, ResponseAdapter<T> adapter); @Override T execute(); @Override void enqueue(final Callback<T> callback); @Override boolean isExecuted(); @Override void cancel(); @Override boolean isCanceled(); @SuppressWarnings("CloneDoesntCallSuperClone") @Override OkHttpCall<T> clone(); }
OkHttpCall implements Call<T> { @Override public boolean isCanceled() { return rawCall.isCanceled(); } OkHttpCall(okhttp3.Call rawCall, ResponseAdapter<T> adapter); @Override T execute(); @Override void enqueue(final Callback<T> callback); @Override boolean isExecuted(); @Override void cancel(); @Override boolean isCanceled(); @SuppressWarnings("CloneDoesntCallSuperClone") @Override OkHttpCall<T> clone();  }