A: 

Since your are mocking the constructor call you have to prepare your code as wall. This is because the constructor invocation is part of your code. Read more in the PowerMock documentation: http://code.google.com/p/powermock/wiki/MockConstructor

Jan Kronquist

related questions