Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

How to write a Junit5 Test case for resource resolver admin user ?

Avatar

Level 2

I have a admin user who is trying to get client id from osgi config. How can I write a Mock Junit5 test case for user and client id?

2 Replies

Avatar

Community Advisor

Hi @baw_gov,

 

As per adobe's recommendations, it is not suggested to use the admin user. Please create a system/service user for retrieving the session. More info on system/service user is available here.

 

For mocking the service user, check the similar question here.

 

Hope this helps.

 

Thanks,

Kiran Vedantam.

Avatar

Level 2
Hi @Kiran_Vedantam thank you for your reply. I am sorry I meant system user only and this is for Junit5. The link you shared above looks like is for Junit4. Do you have any suggestions for Junit5?