Tests sending of unicast and multicast messages
Minor refactoring.