@Override
    public boolean cancel(boolean mayInterruptIfRunning) {
        if (delegate == null) {
            isCancel = true;
            return true;
        }
        return delegate.cancel(mayInterruptIfRunning);
    }
@Test
    public void cancel() {
        final Future<HttpResponse> delegate = Mockito.mock(Future.class);
        FutureDecorator decorator = new FutureDecorator(null);
        ReflectUtils.setFieldValue(decorator, "delegate", delegate);
        decorator.cancel(Mockito.anyBoolean());
        Mockito.verify(delegate, Mockito.times(1)).cancel(Mockito.anyBoolean());
    }