I am testing an application that uses struts2 framework with junit and mockito. I'm getting an illegalstateexception saying that the plugin Mockmaker cannot be initialized I have tried adding dependencies like bytebuddy and objenesis but it is still not working Can someone please guide me on this as I am new to struts2
Exception:
java.lang.IllegalStateException
: Could not initialize plugin MockMaker
Test code:
@RunWith(MockitoJUnitRunner)
Public class HTest{
@InjectMocks
ActionClassToBeTested a
@Mock //issue with this, I checked by commenting everything
HttpServletRequest request
@Mock
HttpServletResponse response
@Test
Public void TestMethod(){
//Some test logic
}
}