title: Mock services in Spring Reactor
body: <p>Let's take a look over this simple method:</p>
  
  <pre><code>public Mono&lt;SuccessResponse&gt; doSomething(){
          return service1.doSomething()
              .then(service2.doSomething2())
              .thenReturn(new SuccessResponse("Awesome")));
  }
  </code></pre>
  
  <p>So basically I want to test this method for a scenario in which, service1.doSomething() will throw an error:</p>
  
  <pre><code>when(service1.doSomething()).thenReturn(Mono.error(new IllegalStateException("Something bad happened")));
  when(service2.doSomething()).thenReturn(Mono.just(new SomeResponse()))
  
  assertThatThrownBy(() -&gt; testedService.doSomething().block())
              .isExactlyInstanceOf(IllegalStateException.class);
  
  verify(service2, never()).doSomething(); //Why this is executed!?
  </code></pre>
  
  <p>My question is why service2.doSomething() is executed once? it shouldn't be executed since service1.doSomething() throw an error above...</p>