LogMessage extends GenericMailet { @Override public void init() { try { passThrough = getInitParameter("passThrough", true); headers = getInitParameter("headers", true); body = getInitParameter("body", true); bodyMax = (getInitParameter("maxBody") == null) ? 0 : Integer.parseInt(getInitParameter("maxBody")); comment = getInitParameter("comment"); } catch (Exception e) { logger.error("Caught exception while initializing LogMessage", e); } } LogMessage(Logger logger);  LogMessage(); @Override void init(); @Override String getMailetInfo(); @Override void service(Mail mail);  }
@Test void initShouldIgnoreExceptions() throws Exception { FakeMailetConfig mailetConfig = FakeMailetConfig.builder() .mailetName("LogContext") .mailetContext(mailContext) .setProperty("maxBody", "comment") .build(); mailet.init(mailetConfig); }