Hi @anasustic , For writing Junits for OSGi Code, You can go for Mockito framework and use AEMContext to mock the resources. Or you can use Sling Mocks- https://sling.apache.org/documentation/development/sling-mock.htmlPlease refer the below links for your reference, https://aemhints.com/2020/12/19/...