@Test
public void propagateCancellationWithInterrupt()
{

    ExtendedSettableFuture<Object> fromFuture = ExtendedSettableFuture.create();
    ExtendedSettableFuture<Object> toFuture = ExtendedSettableFuture.create();
    propagateCancellation(fromFuture, toFuture, true);
    fromFuture.cancel(true);
    assertTrue(toFuture.isCancelled());
    assertTrue(toFuture.checkWasInterrupted());
    // Test interrupt override
    fromFuture = ExtendedSettableFuture.create();
    toFuture = ExtendedSettableFuture.create();
    propagateCancellation(fromFuture, toFuture, true);
    fromFuture.cancel(false);
    assertTrue(toFuture.isCancelled());
    assertTrue(toFuture.checkWasInterrupted());
}