You can mockito framework to run test cases in Java functions. Here is an example of using in Azure Functions
Another documentation which might help : https://learn.microsoft.com/en-us/azure/azure-functions/functions-add-output-binding-storage-queue-java?tabs=maven&pivots=java-build-tools-maven#update-the-tests