Hello,
You might find the following sections of documentation useful:
https://docs.q2developer.com/guides/code_quality/testing/mocking_db_configs.html
https://docs.q2developer.com/guides/code_quality/testing/unit_testing.html
Also, you can poke around the SDK repo as the SDK has very high test coverage:
https://code.q2developer.com/Q2Antilles/q2-sdk/-/blob/develop/sdk/q2_sdk/tools/testing/mock_handler_mixin.py
https://code.q2developer.com/Q2Antilles/q2-sdk/-/tree/develop/sdk/tests/test_q2_sdk
Hope this helps,
Trey Teter
Software Engineer