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.
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?