title: Mocking java8 stream.map
body: <p>I am using mockito how can I mock stream.map() call.</p>
  
  <p>I tried something like this which return null.</p>
  
  <pre><code>@Mock Stream&lt;String&gt; stringStream;
  @Mock Stream&lt;String&gt; upperCaseStream;
  
  when(stringStream.map(String::toUpperCase)).thenReturn(upperCaseStream);
  syso(stringStream.map(String::toUpperCase));
  </code></pre>
  
  <p>This prints null.</p>
  
  <p>I am looking for a correct way of mocking that would return 'upperCaseStream' in output.</p>