I am trying to use mockito on my eclipse rcp project. For some reason I get this error each time I am going to run my unit-test:
java.lang.NoClassDefFoundError: org/mockito/Mockito Caused by:
java.lang.ClassNotFoundException: org.mockito.Mockito
My code is similar with this in mockito sample:
@Test
public void testExecuteStep(){
List test = mock(List.class); //here the exception will be thrown.
}
Can anybody give me a solution of this problem?
It seems to me that Mockito is not properly setup in your project, are you sure that it’s on the classpath?