title: How to test Mono.zip(...).map(...)?
body: <p>I'm working with some code that I'd like to write test for, but am new to the Project Reactor side of things. The basic code looks like this:</p>
  <pre><code>    Mono&lt;SomeClass&gt; prep(Request request) {
          Object1 object1 = new Object1();
          Object2 object2 = new Object2();
          Object3 object3 = new Object3();
          return Mono.zip(Mono.just(Optional.of(object1), Mono.just(Optional.of(object2),
                   Mono.just(Optional.of(object3))
              .map(r -&gt; {
                          SomeClass2 sc2 = r.getT1().orElse(null);
                          SomeClass3 sc3 = SomeClass3.builder().build();
                          SomeClass4 sc4 = SomeClass4.builder().build();
                          SomeClass5 sc5 = SomeClass5.builder().build();
  
                          return SomeClass.builder()
                                    .field1(sc2)
                                    .field2(sc3)
                                    .field3(sc4)
                                    .field4(sc4).build();
                        });
      }
  </code></pre>
  <p>I've seen examples of using StepVerifier, but not with this kind of chaining of operations. The one test I did write got through the Mono.zip part, but left the .map code untested. Getting through the .zip part was really just setting up the objects to be used inside of the .zip.</p>
  <p>All help appreciated! Thanks.</p>