We have to upgrade the mockito version to atleast 3.4 or any higher.
However the moment we upgrade it all test cases start breaking :
Page page = aemContext.create().page("/content/testPage");
with error
java.lang.IllegalArgumentException: Illegal page name.
This is what our pom looks like after upgrade :
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.6.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>5.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>5.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit-addons</groupId>
<artifactId>junit-addons</artifactId>
<version>1.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.wcm</groupId>
<artifactId>io.wcm.testing.aem-mock.junit5</artifactId>
<version>3.0.2</version>
<scope>test</scope>
</dependency>
Same error with mockito 3.4 as well
<error message="Illegal page name." type="java.lang.IllegalArgumentException">java.lang.IllegalArgumentException: Illegal page name.
However, it works fine if we keep mockito version to 3.3.3, but an upgrade is required
Views
Replies
Total Likes
Yes, we did.
The error remains exactly the same
Hi @maheshp
Similar issue is posted here:: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/java-lang-illegalargumente...
I think it is with the version upgrade. @kautuk_sahni can you please guide here on how to proceed?
Thanks,
Kiran Vedantam.
you might be hitting the same issue as discussed here: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/gson-version-update-to-2-8...
I am seeing this with version 5.1.2 and error is java.lang.IllegalArgumentException: Illegal page name.
io.wcm.testing.aem-mock.junit5
version: 5.1.2
Views
Replies
Total Likes