public class MessageNotificationTest {
@Test
public void testMessageNotificationContainsEmailAddressIfAddressNotNull() throws Exception {
MessageNotification messageNotification = new MessageNotification(new CorrespondenceSettings(), "test@example.com");
NotificationBEList notifications = messageNotification.getNotifications();
assertEquals(1, notifications.getNotification().size());
assertEquals(2, notifications.getNotification().get(0).getReceiverEndPoints().getReceiverEndPoint().size());
ReceiverEndPoint smsEndpoint = notifications.getNotification().get(0).getReceiverEndPoints().getReceiverEndPoint().get(0);
ReceiverEndPoint mailEndpoint = notifications.getNotification().get(0).getReceiverEndPoints().getReceiverEndPoint().get(1);
assertEquals(TransportType.SMS, smsEndpoint.getTransportType());
assertEquals("", smsEndpoint.getReceiverAddress());
assertEquals(TransportType.EMAIL, mailEndpoint.getTransportType());