@Test
public void testValidRecipientsButInvalidSenderForSendAsSeparateMails() {

    // setup
    OLATPrincipal invalidSender = ObjectMother.createInvalidPrincipal();
    recipients.add(invalidSender);
    MailerResult result = new MailerResult();
    //
    result = mailerWithTemplate.sendMailAsSeparateMails(recipients, null, recipientsBCC, template, invalidSender);
    // verify
    assertEquals(MailerResult.SENDER_ADDRESS_ERROR, result.getReturnCode());
    verifyTimesCallingCreateAndSendMessageInvocationsFor(0, null, null, null);
}