@Test
public void testExternalActionCancel() throws InterruptedException {

    newReconcilerWithRegistrations(data -> Collections.emptyList(), "r1", "a");
    CountDownLatch subscribeLatch = new CountDownLatch(1);
    AtomicBoolean canceled = new AtomicBoolean();
    Mono<String> action = Mono.<String>never()
            .doOnSubscribe(s -> subscribeLatch.countDown())
            .doOnCancel(() -> canceled.set(true));
    Disposable disposable = reconciler.apply("r1", data -> action).subscribe();
    subscribeLatch.await();
    assertThat(disposable.isDisposed()).isFalse();
    assertThat(canceled.get()).isFalse();
    disposable.dispose();
    await().until(canceled::get);
    assertThat(changesSubscriber.takeNext()).isNull();
    // Now run regular action
    assertThat(reconciler.apply("r1", anything -> Mono.just("Regular")).block(TIMEOUT)).isEqualTo("Regular");
}