Add tests for sendMessage and sendException