Rewrite test_send()
The test_send()
essentially duplicated the tests of all other other functions. Here, I have mocked all the possible functions called in send()
and we assert that the expected functions were called, and that no unexpected functions were called,.