Considering a developer is creating a serverless application function that interacts with a NoSQL database service provided by a cloud provider, how can the developer effectively implement unit tests for the function to simulate interactions with the database without deploying the code?
Employ a mocking framework to create a simulated environment of the NoSQL database.
Rely on manual testing after deployment for each iteration of the function code.
Connect the function to a live instance of the NoSQL database for each test to ensure accurate results.
Only use console logging within the function to verify the correct behavior during test runs.