PrimitiveAndWrapperDemo mock = createNiceMockAndExpectNew(PrimitiveAndWrapperDemo.class, new Class<?>[] { Integer.class }, 42);
expect(mock.getMyInt()).andReturn(2);
replayAll();
assertEquals(2, new PrimitiveAndWrapperUser().useThem());
verifyAll();
}