@PrepareForTest(PrimitiveAndWrapperUser.class)
public class PrimitiveAndWrapperUserTest {
@Test
public void testNewWithStrictMocking_ok() throws Exception {
PrimitiveAndWrapperDemo mock1 = createStrictMockAndExpectNew(PrimitiveAndWrapperDemo.class, new Class<?>[] { Integer.class }, 42);
PrimitiveAndWrapperDemo mock2 = createStrictMockAndExpectNew(PrimitiveAndWrapperDemo.class, new Class<?>[] { int.class }, 21);
expect(mock1.getMyInt()).andReturn(10);
expect(mock2.getMyInt()).andReturn(21);
replayAll();
assertEquals(31, new PrimitiveAndWrapperUser().useThem());