Per T328969: AQS 2.0: Revisit in-service testing approach, we are refactoring in-service tests to separate "unit" tests, which have no external dependencies, from "integration" tests, which may depend on a datastore external to the service
Create unit tests for the Device Analytics handler function (the service exposes only one endpoint, so there is only one relevant handler function) by mocking the logic layer.
It is not necessary to comprehensively test all expected values from the response. That will be done by the "integration" tests. For purposes of this new "unit" test, it is sufficient to confirm that the handler function performs properly when the logic layer responds with data of the expected schema/shape or, for a negative test, has the expected error behavior.
The bulk of the handler code is parameter validation. The unit tests should confirm that this works as expected, by verifying that the handler responds with expected errors for disallowed parameters, and allows expected parameters.