@Test
public void testSubscriptionWithSnapshot() {

    downstream1.makeHealthy(taskId1);
    downstream2.makeHealthy(taskId1);
    StepVerifier.create(healthService.events(true))
            // Check snapshot
            .assertNext(event -> assertContainerHealthSnapshot(
                    event, status -> status.getTaskId().equals(taskId1) && status.getState() == ContainerHealthState.Healthy)
            )
            // Now trigger change
            .then(() -> downstream1.makeUnhealthy(taskId1))
            .assertNext(event -> assertContainerHealthEvent(event, taskId1, ContainerHealthState.Unhealthy))
            .thenCancel()
            .verify(Duration.ofSeconds(5));
}