IndexService { String template(String path) { String template = ClasspathResources.text(path); return template.replace("${NUMBER_OF_SHARDS}", String.valueOf(option.numberOfShards)) .replace("${REFRESH_INTERVAL}", option.refreshInterval); }  void createIndexTemplatesUntilSuccess(); void createIndexTemplates(); Optional<LocalDate> createdDate(String index);  }
@Test void template() { assertThat(indexService.template("index/action-index-template.json")) .contains("\"number_of_shards\": \"3\"") .contains("\"refresh_interval\": \"3s\""); }