QuestionQ15
Given a scenario, identify how to implement OSGi services and servletsA developer is working on an AEM application used to calculate an employee's salary. The calculation is performed by an OSGi service named CalculationService. This service class depends on one other service, named EmployeeService.
How should the developer ensure that the critical code in CalculationService receives high unit-test coverage?
- A Use a mock framework in the unit test to inject the CalculationService
- B Instantiate the EmployeeService in the unit test and pass it to the constructor of the CalculationService
- C Use a mock framework in the unit test to inject the EmployeeService
- D Use the feature flag in the unit test to disable the calls to the EmployeeService
Community Discussion