I am using JMockit 0.999, JUnit 4.82 and Jumble 1.1.0 on Oracle/Sun HotSpot 6u21.
JMockit is a mock objects library. It allows for overriding the functionality of the objects being tested. This makes writing tests easier.
Unfortunately, JMockit and Jumble don't work together.
First, I had to add -javaagent:jmockit.jar to the command line otherwise I get this error... java.lang.UnsatisfiedLinkError: Native Library C:\Program Files\Java\jdk1.6.0_21\jre\bin\attach.dll already loaded in another classloader
Second, I get a NullPointerException inside Mockit.setUpMock() when called from my @Before method. The stack trace doesn't including anything in Mockit and is therefore misleading. I can step into the setUpMock() method so the NPE is coming from there.
I filed a defect on the JMockit site. http://code.google.com/p/jmockit/issues/detail?id=92&colspec=ID%20Type%20Status%20Priority%20Summary Please work with that person on resolving this.