@Test
public void testWithoutMailhostConfiguredTheSendAsSeparateMailsFails() {

    // setup
    when(webappAndMailhelperMock.getMailhost()).thenReturn(null);
    // exercise
    MailerResult result = mailerWithTemplate.sendMailAsSeparateMails(recipients, null, null, template, ruedi);
    // verify
    assertEquals(MailerResult.MAILHOST_UNDEFINED, result.getReturnCode());
}