Mockito mock a method but use its parameters for the mocked return
<p>There is a method <code>public Content createChild(String path, String contentType, Map&lt;String,Object&gt; properties)</code> I'd like to mock.</p>

<p>I want to mock it that way that the method is called with any kind of arguments, therefore <code>when()</code> wouldn't work because I have to tell it what arguments the method should receive to be actually mocked.</p>

<p>So I want to actually react on any method call independent of its given arguments (use spies?) and then call some kind of "callback" to return a <code>Content</code> object which I want build together out of the real arguments given to the method.</p>

<p>I could not find a specific API in Mockito which supports this.</p>