Question: jmock how to mock a class?
Answer: Add jmock-legacy-2.6. jar, cglib-nodep-2.1_3. jar and objenesis-1.0. ...  Plug the ClassImposteriser into the Mockery of your test class: Raw. import org. ...  Your tests can now create mocks of abstract or even concrete classes: Graphics g = context.mock(java.awt.Graphics.class);