title: Whennew() call in powermockito not working
body: <p>I'm using Mockito and PowerMockito to instantiate a mock when a constructor is called:</p>
  
  <pre><code>@RunWith(MockitoJUnitRunner.class)
  @PrepareForTest(ConVibe.class)
  public class ConVibeTests {
  
      ConVibe task;
  
      @Mock ShapeEffect shapeEffect;
  
  
  
      @Test
      public void verify_shape_effect() {
  
          whenNew(ShapeEffect.class).withAnyArguments().thenReturn(shapeEffect);
          task.call();
  
          // Omitted
      }
  
      // Omitted
  
  }
  </code></pre>
  
  <p>This is the call to the constructor that I wanted to mock, located inside the function call() in the class conVibe:</p>
  
  <pre><code>final ShapeEffect effect = new ShapeEffect(mode, new RepService());
  </code></pre>
  
  <p>The fact is that the real constructor is called (where there is a DB call that obviously fail) instead of creating a mock.</p>
  
  <p>What's wrong?</p>