@Test
public void sourceFutureHasBeenCancelled_correctlyFillCompletableFuture() throws InterruptedException {

    Future<Boolean> origin = new FutureWithSource<>(new AtomicReference<>());
    CompletableFuture<Boolean> shifted = Futurity.shift(origin);
    assertFalse(shifted.isDone());
    origin.cancel(false);
    await().pollInterval(1, TimeUnit.MILLISECONDS).pollDelay(0, TimeUnit.MILLISECONDS)
           .atMost(1, TimeUnit.SECONDS).until(shifted::isDone);
    assertTrue(shifted.isCancelled());
}