JUnit: Intercepting a method call and then invoking with different params
<p>I am working on junit and using PowerMockRunner to mock static methods. </p>

<p>I am aware that static methods can be mocked using <code>when(...).thenReturn(...)</code> </p>

<p>I need to mock a certain method that takes four arguments:</p>

<pre><code>public static void addInputPath(String, Boolean, Integer, Double)
</code></pre>

<p>I need the third parameter(Integer) in any call to this method to be replaced by, say <code>10</code>. All other parameters should just be passed as is.</p>

<p>In other words, I need to do something like this:</p>

<pre><code>when(addInputPath(str, bool, intgr, dbl)).thenReturn(addInputPath(str, bool, 10, dbl));
</code></pre>

<p>Is there a way to do this?</p>