@SuppressWarnings("unchecked") @Test public void getRemoteMailContent() throws ParseException, IOException { PowerMockito.mockStatic(PacHttpUtils.class); when(PacHttpUtils.getHttpGet(anyString(), anyMap())).thenReturn("test"); assertThat(mailContentService.getRemoteMailContent("template"), is(notNullValue())); }
public String getRemoteMailContent(String templateUrl) throws ParseException, IOException { Map<String, String> headers = Maps.newHashMap(); headers.put("Conent-Type", "text/html"); return PacHttpUtils.getHttpGet(templateUrl, headers); }
MailContentBuilderService { public String getRemoteMailContent(String templateUrl) throws ParseException, IOException { Map<String, String> headers = Maps.newHashMap(); headers.put("Conent-Type", "text/html"); return PacHttpUtils.getHttpGet(templateUrl, headers); } }
MailContentBuilderService { public String getRemoteMailContent(String templateUrl) throws ParseException, IOException { Map<String, String> headers = Maps.newHashMap(); headers.put("Conent-Type", "text/html"); return PacHttpUtils.getHttpGet(templateUrl, headers); } @Autowired  MailContentBuilderService(TemplateEngine templateEngine); }
MailContentBuilderService { public String getRemoteMailContent(String templateUrl) throws ParseException, IOException { Map<String, String> headers = Maps.newHashMap(); headers.put("Conent-Type", "text/html"); return PacHttpUtils.getHttpGet(templateUrl, headers); } @Autowired  MailContentBuilderService(TemplateEngine templateEngine); String build(final String templateNameOrUrl, final Map<String, String> details); String buildPlainTextMail(String mailBody, final Map<String, Object> details); String getRemoteMailContent(String templateUrl); }
MailContentBuilderService { public String getRemoteMailContent(String templateUrl) throws ParseException, IOException { Map<String, String> headers = Maps.newHashMap(); headers.put("Conent-Type", "text/html"); return PacHttpUtils.getHttpGet(templateUrl, headers); } @Autowired  MailContentBuilderService(TemplateEngine templateEngine); String build(final String templateNameOrUrl, final Map<String, String> details); String buildPlainTextMail(String mailBody, final Map<String, Object> details); String getRemoteMailContent(String templateUrl);  }