I'm trying to mock a generic class, like this:
JobDispatcher<JobBuilding> dispatcher;
(...)
@SuppressWarnings("unchecked")
@Before
public void setUp() throws Exception {
dispatcher = createMock(JobDispatcher.class);
}
The Generic class has a specific Type parameter:
public class JobDispatcher<Job_Type extends Job> {
where Job is the superclass of JobBuilding. When I'm running the test, I get an error:
java.lang.NoClassDefFoundError: org/objectweb/asm/Type
at (...)
Caused by: java.lang.ClassNotFoundException: org.objectweb.asm.Type
at (...)
The end of the first trace points to the line in the setUp() that creates the mock (shown above). Does anyone have an idea what causes the problem?
Thanks for your help.