Refactored tests for mesaage transmition