DirectInboundMsgHandler implements MessageHandler { @Override public boolean handleMessage(MimeMessage message) { boolean handled = false; try { directReceiver.receiveInbound(message); handled = true; } catch (Exception e) { LOG.error("Exception while processing and sending outbound direct message", e); } return handled; } DirectInboundMsgHandler(DirectReceiver directReceiver); @Override boolean handleMessage(MimeMessage message);  }
@Test public void canHandleInboundMessageSmtpEdgeClient() throws MailClientException { setUpForSmtpEdgeClient(); testInboundMsgHandler.handleMessage(getSampleMimeMessage()); verifyInboundMessageHandler(2, 1, 1); }
@Test public void willLogNotificationsWhenProcessedMessageIsNullSmtpEdgeClient() throws MailClientException { setUpForSmtpEdgeClient(); when(mockResult.getProcessedMessage()).thenReturn(null); testInboundMsgHandler.handleMessage(getSampleMimeMessage()); verifyInboundMessageHandler(1, 0, 0); }
@Test public void canHandleInboundMessageSoapEdgeClient() throws MailClientException { setUpForSoapEdgeClient(); testInboundMsgHandler.handleMessage(getSampleMimeMessage()); verifyInboundMessageHandler(2, 1, 0); }