### Question:
ConfigFileService { public String getLocalPathForContents(String contents, String path) { if (StringUtils.isNotEmpty(contents)) { return ConfigFileUtils.writeToTempFile(contents, path); } return null; } ConfigFileService(CloudConfigResourceService cloudConfigResourceService); String getLocalPath(String path); String getLocalPathForContents(String contents, String path); String getContents(String path);  }### Answer:
@Test void getLocalPathWhenContentProvided() { String fileName = configFileService.getLocalPathForContents(TEST_FILE_CONTENTS, TEST_FILE_NAME); assertThat(fileName).isEqualTo(TEST_FILE_PATH); }