@Test
public void testForRecipientAddressErrorIfInvalidRecipientProvidedForSendAsSeparateMails() {

    // setup
    OLATPrincipal invalidRecipient = ObjectMother.createInvalidPrincipal();
    List<OLATPrincipal> invalidRecipients = new ArrayList<OLATPrincipal>();
    invalidRecipients.add(invalidRecipient);
    // exercise
    MailerResult result = mailerWithTemplate.sendMailAsSeparateMails(invalidRecipients, null, null, template, ruedi);
    // verify
    assertEquals(MailerResult.RECIPIENT_ADDRESS_ERROR, result.getReturnCode());
    verifyTimesCallingCreateAndSendMessageInvocationsFor(0, null, null, null);
}