since ‎28-08-2018
‎10-12-2019
HKesani
Level 1
Re: Unable to inject a service in junit test cases to test a sling model (having an injection of service using @OSGiService annotation)
Avatar

ArpitVarshney

MVP

ArpitVarshney
- Adobe Experience Manager
Hi HKesani,Could you please give a try to below code to mock OSGi service?Reference: https://wcm.io/testing/aem-mock/usage.html#Registering_OSGi_serviceRegards,Arpit Varshney

Views

1.3K

Like

1

Replies

0
Likes given to
Likes from