Mocking and expecting a function called from an async task

I have code like this

def async_upload(external_id, pdf_body) do
  Task.Supervisor.start_child(Docbox.DocumentUploadTask, fn ->
        S3UploadService.save_document_to_s3(external_id, pdf_body)

where Docbox.DocumentUploadTask is a TaskSupervisor. I need to test this piece of code by mocking and expecting the s3 put_object call. But since this is run async, how will I do this?

Is the S3UploadService something you own? I feel like mocking put_object is very low. At a higher level, you want to know that the document saved was called and mock there might be a better location.

Allow the async_upload to take in the mock would be how I would approach it.