var bindings = storageService.uploadComponent(repoId, assetId, resourceId, UUID.randomUUID().toString(), null, null, "text/plain", Mono.just(componentPart));
StepVerifier.create(bindings).consumeNextWith(b -> {
var stagedUploadRecord = stagedUploadRepository.findRevision(repoId, assetId, resourceId, b.getRevisionId());
StepVerifier.create(stagedUploadRecord).expectNextCount(1L).verifyComplete();
}).verifyComplete();
This code calls a functions which adds records to several tables and produces a publisher, Mono. I would like to verify that there is one binding and then verify that records were added to the individual tables, but I need some info from the bindings to read the records from the individual tables.
So I thought that I could do this using consumeNextWith, but as soon as I put the StepVerifier.create inside the consumeNextWith the whole pipeline freezes.