Question: jmockit how to mock constructor?
Answer: You can mock out just the constructor and test the other methods. Mocking constructors is well-documented at the JMockIt project site. Running the production code will print Production constructor called , but running it under test will print Mock constructor called .