@Test public void should_not_change_status() { String body = "{ \"status\" : \"UNKNOWN\" }"; wireMock.stubFor(get("/health").willReturn(okJson(body).withHeader("Content-Type", Integer.toString(body.length()) ))); StepVerifier.create(eventStore) .expectSubscription() .then(() -> StepVerifier.create(updater.updateStatus(instance.getId())).verifyComplete()) .expectNoEvent(Duration.ofMillis(100L)) .thenCancel() .verify(); }
public Mono<Void> updateStatus(InstanceId id) { return repository.computeIfPresent(id, (key, instance) -> this.doUpdateStatus(instance)).then(); }
StatusUpdater { public Mono<Void> updateStatus(InstanceId id) { return repository.computeIfPresent(id, (key, instance) -> this.doUpdateStatus(instance)).then(); } }
StatusUpdater { public Mono<Void> updateStatus(InstanceId id) { return repository.computeIfPresent(id, (key, instance) -> this.doUpdateStatus(instance)).then(); } StatusUpdater(InstanceRepository repository, InstanceWebClient instanceWebClient); }
StatusUpdater { public Mono<Void> updateStatus(InstanceId id) { return repository.computeIfPresent(id, (key, instance) -> this.doUpdateStatus(instance)).then(); } StatusUpdater(InstanceRepository repository, InstanceWebClient instanceWebClient); Mono<Void> updateStatus(InstanceId id); }
StatusUpdater { public Mono<Void> updateStatus(InstanceId id) { return repository.computeIfPresent(id, (key, instance) -> this.doUpdateStatus(instance)).then(); } StatusUpdater(InstanceRepository repository, InstanceWebClient instanceWebClient); Mono<Void> updateStatus(InstanceId id);  }