Test cases are failing after updating the mockito core dependency | Community
Skip to main content
sravs
New Participant
Mar 6, 2023 6:49 AM UTC
Solved

Test cases are failing after updating the mockito core dependency

After updating the mockito core dependency to the latest version my test cases are failing. getting below error.

 

java.lang.IllegalArgumentException: Illegal page name.

at io.wcm.testing.mock.aem.MockPageManager.create(MockPageManager.java:100)
at io.wcm.testing.mock.aem.builder.ContentBuilder.page(ContentBuilder.java:148)
at io.wcm.testing.mock.aem.builder.ContentBuilder.page(ContentBuilder.java:173)

 

Can you please help me with this.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
sravs
sravsAccepted solution
New Participant
Mar 10, 2023 5:29 AM UTC

Thanks for your reply @tarunkumar , I'm able to resolve the issue by updating other dependencies as mentioned below.

 

<dependency> <groupId>org.junit</groupId> <artifactId>junit-bom</artifactId> <version>5.9.1</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> <version>4.8.1</version> <scope>test</scope> </dependency> <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-junit-jupiter</artifactId> <version>4.8.1</version> <scope>test</scope> </dependency> <dependency> <groupId>io.wcm</groupId> <artifactId>io.wcm.testing.aem-mock.junit5</artifactId> <version>5.1.0</version> <scope>test</scope> </dependency>

Thanks

Sravani

2 replies

TarunKumar
New Participant
Mar 9, 2023 3:42 PM UTC

Hi @sravs ,

Can you share the screen shot of the pom as how you have injected the mockito for better clarity.

Translate
sravs
sravsAuthorAccepted solution
New Participant
Mar 10, 2023 5:29 AM UTC

Thanks for your reply @tarunkumar , I'm able to resolve the issue by updating other dependencies as mentioned below.

 

<dependency> <groupId>org.junit</groupId> <artifactId>junit-bom</artifactId> <version>5.9.1</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> <version>4.8.1</version> <scope>test</scope> </dependency> <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-junit-jupiter</artifactId> <version>4.8.1</version> <scope>test</scope> </dependency> <dependency> <groupId>io.wcm</groupId> <artifactId>io.wcm.testing.aem-mock.junit5</artifactId> <version>5.1.0</version> <scope>test</scope> </dependency>

Thanks

Sravani

Translate