@Test void testGetFileContentsFromPath() throws Exception { String expected = Resources.toString( Resources.getResource(CUSTOM_BODY_TEXT_RESOURCE_FILE), StandardCharsets.UTF_8); assertEquals(expected, DEFAULT_FACTORY.getFileContents(CUSTOM_BODY_TEXT_FILE_PATH, CUSTOM_BODY_HTML_FILE_PATH)); }
String getFileContents(@Nullable String filePath, String defaultFilePath) { if (filePath != null) { return readFileFromPath(filePath); } return readFileAsResources(defaultFilePath); }
EmailServiceFactory implements Discoverable { String getFileContents(@Nullable String filePath, String defaultFilePath) { if (filePath != null) { return readFileFromPath(filePath); } return readFileAsResources(defaultFilePath); } }
EmailServiceFactory implements Discoverable { String getFileContents(@Nullable String filePath, String defaultFilePath) { if (filePath != null) { return readFileFromPath(filePath); } return readFileAsResources(defaultFilePath); }  }
EmailServiceFactory implements Discoverable { String getFileContents(@Nullable String filePath, String defaultFilePath) { if (filePath != null) { return readFileFromPath(filePath); } return readFileAsResources(defaultFilePath); }  @JsonGetter("messageOptions") MessageOptionsConfiguration getMessageOptionsConfiguration(); String getFromAddress(); Boolean isEnabled(); abstract EmailService createEmailService(MetricRegistry metrics); abstract EmailHealthCheck createHealthCheck(); MessageOptions getMessageOptions(); }
EmailServiceFactory implements Discoverable { String getFileContents(@Nullable String filePath, String defaultFilePath) { if (filePath != null) { return readFileFromPath(filePath); } return readFileAsResources(defaultFilePath); }  @JsonGetter("messageOptions") MessageOptionsConfiguration getMessageOptionsConfiguration(); String getFromAddress(); Boolean isEnabled(); abstract EmailService createEmailService(MetricRegistry metrics); abstract EmailHealthCheck createHealthCheck(); MessageOptions getMessageOptions();  }