How to pass a mock into a spy constructor?
<pre><code>@RunWith(MockitoJUnitRunner.class)
public class Test {

    @Mock private A a;
    @Spy private B b = new B(a);
</code></pre>

<p>When 'b' is constructed 'a' is still null. Once the unit test hits some methods 'a' will be not null.</p>

<p>Is there a way to construct a spy 'b' with a non null mock 'a'?</p>