title: Mock object method by calling another object's method with the first one's arguments?
body: <p>I just want to do this:</p>
  <pre><code>Mockito.when(methodOne.read(Mockito.any(byte[].class)).
  thenReturn(methodTwo.read(***The argument methodOne was called with (aka whatever was Mockito.any(byte[].class))***));
  </code></pre>
  <p>Specifically, I have an inputstream that reads into a byte[] array. However, this inputstream cannot be read from during unit testing, so I need to mock this by reading from another inputstream that I will hardcode some values. This other input stream should also read into the byte[] array. Any way to do this?</p>
  <p>I tried the below but it gives me a weird error message: error: incompatible types: no instance(s) of type variable(s) T exist so that Answer conforms to byte[]:</p>
  <pre><code>Mockito.when(inStreamOne.read(Mockito.any(byte[].class))).then(inStreamTwo.read(returnsFirstArg()));
  </code></pre>