use of org.nhindirect.stagent.mail.notifications.NotificationMessage in project nhin-d by DirectProject.
the class NotificationProducerTest method testProduceSingleMDN.
public void testProduceSingleMDN() throws Exception {
NotificationSettings setting = new NotificationSettings(true, "", "");
NotificationProducer prod = new NotificationProducer(setting);
IncomingMessage msg = getMessageFromFile("PlainIncomingMessage.txt", Arrays.asList("cerner.com"));
Collection<NotificationMessage> notes = prod.produce(msg);
assertNotNull(notes);
assertEquals(1, notes.size());
NotificationMessage noteMsg = notes.iterator().next();
assertEquals(msg.getDomainRecipients().get(0).toString(), noteMsg.getFrom()[0].toString());
}
Aggregations