Mockito inline Underlying exception : java.lang.IllegalArgumentException: Could not create type

86 Views Asked by At

I am facing the following issue no matter what version of mockito I use: org.mockito.exceptions.base.MockitoException:

Mockito cannot mock this class: class org.apache.commons.lang.text.StrLookup.

If you're not sure why you're getting this error, please open an issue on GitHub.

Java : 11 JVM vendor name : Oracle Corporation JVM vendor version : 11.0.22+9-LTS-219 JVM name : Java HotSpot(TM) 64-Bit Server VM JVM version : 11.0.22+9-LTS-219 JVM info : mixed mode OS name : Linux OS version : 5.10.102.2-microsoft-standard

You are seeing this disclaimer because Mockito is configured to create inlined mocks. You can learn about inline mocks and their limitations under item #39 of the Mockito class javadoc.

Underlying exception : java.lang.IllegalArgumentException: Could not create type at com.vorwerk.aem.global.email.AbstractEmailActionTest.(AbstractEmailActionTest.java:38) Caused by: java.lang.IllegalArgumentException: Could not create type at com.vorwerk.aem.global.email.AbstractEmailActionTest.(AbstractEmailActionTest.java:38) Caused by: java.lang.VerifyError at com.vorwerk.aem.global.email.AbstractEmailActionTest.(AbstractEmailActionTest.java:38)

I tried changing the version of mockito and also moving to mockito-core to mockito-bom

0

There are 0 best solutions below