I am trying to Mock SlingSettingsService with run modes in Junit5. In my h.java file, in Activate method I have.srun = slingSettingsService.getRunModes().contains("runMode");How do I mock this in my htest.java file? This is for Junit5.
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?
Thank you for your prompt reply @koenve..I will try this method. Can you please also suggest me how to write setup method with the example you gave above?
I have an activate method in service implementation class that is using OSGI configuration. I am looking for how to write Junit5 Test Cases for Activate method.