In a class under test, if its constructor takes in an abstract class parameter can we mock it using mockito?
Ex
public abstract AbstractClass{
}
//Class under test
public class SourceClass{
SourceClass(AbstractClass abstractClass){}
}
@RunWith(MockitoJUnitRunner.class
public SourceClassTest{
@Mock
AbstractClass abstractClass;
}
whenever I do this i get this error
java.lang.ExceptionInInitializerError
Ther version of mockito I am using i 1.8.5
Aucun commentaire:
Enregistrer un commentaire