Solved
How to write a junit for activate and deactivate method?
No text available
Please refer this document :
https://sling.apache.org/documentation/development/osgi-mock.html#activation-and-dependency-injection
// activate service
MockOsgi.activate(service, props);
// deactivate service
MockOsgi.deactivate(service);
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.