assertNull("Header removed",mail.getMessage().getHeader(HEADER1));
assertNotNull("Header present",mail.getMessage().getHeader(HEADER2));
}
public void testTwoHeaderRemoved() throws MessagingException {
GenericMailet mailet = setupMockedMailet(HEADER1,HEADER2);
Mail mail = getMockedMail(getMockedMimeMessage());
// Get sure both headers are present
assertNotNull("Header present",mail.getMessage().getHeader(HEADER1));
assertNotNull("Header present",mail.getMessage().getHeader(HEADER2));
mailet.service(mail);
// Both header should be removed
assertNull("Header removed",mail.getMessage().getHeader(HEADER1));
assertNull("Header removed",mail.getMessage().getHeader(HEADER2));
}