@Test void getContentsWhenFileExists() throws IOException { createExpectedFile(); String contents = configFileService.getContents(TEST_FILE_PATH); assertThat(contents).isEqualTo(TEST_FILE_CONTENTS); }
public String getContents(String path) { if (StringUtils.isNotEmpty(path)) { if (isClasspathResource(path)) { return retrieveFromClasspath(path); } return retrieveFromLocalPath(getLocalPath(path)); } return null; }
ConfigFileService { public String getContents(String path) { if (StringUtils.isNotEmpty(path)) { if (isClasspathResource(path)) { return retrieveFromClasspath(path); } return retrieveFromLocalPath(getLocalPath(path)); } return null; } }
ConfigFileService { public String getContents(String path) { if (StringUtils.isNotEmpty(path)) { if (isClasspathResource(path)) { return retrieveFromClasspath(path); } return retrieveFromLocalPath(getLocalPath(path)); } return null; } ConfigFileService(CloudConfigResourceService cloudConfigResourceService); }
ConfigFileService { public String getContents(String path) { if (StringUtils.isNotEmpty(path)) { if (isClasspathResource(path)) { return retrieveFromClasspath(path); } return retrieveFromLocalPath(getLocalPath(path)); } return null; } ConfigFileService(CloudConfigResourceService cloudConfigResourceService); String getLocalPath(String path); String getLocalPathForContents(String contents, String path); String getContents(String path); }
ConfigFileService { public String getContents(String path) { if (StringUtils.isNotEmpty(path)) { if (isClasspathResource(path)) { return retrieveFromClasspath(path); } return retrieveFromLocalPath(getLocalPath(path)); } return null; } ConfigFileService(CloudConfigResourceService cloudConfigResourceService); String getLocalPath(String path); String getLocalPathForContents(String contents, String path); String getContents(String path);  }