@Test void initShouldThrowWhenMailStoreThrows() throws Exception { when(mailRepositoryStore.select(any())).thenThrow(new RuntimeException()); FakeMailetConfig mailetConfig = FakeMailetConfig.builder() .mailetName("Test") .setProperty("repositoryPath", REPOSITORY_PATH) .build(); assertThatThrownBy(() -> mailet.init(mailetConfig)) .isInstanceOf(MessagingException.class); }
@Override public void init() throws MessagingException { repositoryPath = MailRepositoryUrl.from(getInitParameter("repositoryPath")); passThrough = getPassThroughParameter(); repository = selectRepository(); }
ToRepository extends GenericMailet { @Override public void init() throws MessagingException { repositoryPath = MailRepositoryUrl.from(getInitParameter("repositoryPath")); passThrough = getPassThroughParameter(); repository = selectRepository(); } }
ToRepository extends GenericMailet { @Override public void init() throws MessagingException { repositoryPath = MailRepositoryUrl.from(getInitParameter("repositoryPath")); passThrough = getPassThroughParameter(); repository = selectRepository(); } @Inject  ToRepository(MailRepositoryStore mailStore); }
ToRepository extends GenericMailet { @Override public void init() throws MessagingException { repositoryPath = MailRepositoryUrl.from(getInitParameter("repositoryPath")); passThrough = getPassThroughParameter(); repository = selectRepository(); } @Inject  ToRepository(MailRepositoryStore mailStore); @Override void init(); @Override void service(Mail mail); @Override String getMailetInfo(); }
ToRepository extends GenericMailet { @Override public void init() throws MessagingException { repositoryPath = MailRepositoryUrl.from(getInitParameter("repositoryPath")); passThrough = getPassThroughParameter(); repository = selectRepository(); } @Inject  ToRepository(MailRepositoryStore mailStore); @Override void init(); @Override void service(Mail mail); @Override String getMailetInfo();  }