I'll looking about mocking of constructor calls in tested method. Something like http://code.google.com/p/powermock/wiki/MockConstructor
The problem is that I'm working under JDK 1.4 (this is requirement of customer). I tried to use Retrotranslator for PowerMock, but it seems that I can do nothing about required use of annotations @RunWith(PowerMockRunner.class) and @PrepareForTest for running example.
Maybe somebody can advise me the mocking framework which works under JDK 1.4 and can mock construction of new objects?
JMock 1 for JDK 1.3 and above http://www.jmock.org/download.html
Easymock has a version compatible with JDK 1.3 I think http://sourceforge.net/projects/easymock/files/EasyMock/1.2/easymock1.2_Java1.3.zip/download