static String computeDetailsAsString(SearchRequest searchRequest) {
    StringBuilder message = new StringBuilder();
    message.append(String.format("ES search request '%s'", searchRequest));
    if (searchRequest.indices().length > 0) {
      message.append(String.format(ON_INDICES_MESSAGE, Arrays.toString(searchRequest.indices())));
    }
    return message.toString();
  }
@Test
  public void should_format_ClearIndicesCacheRequest() {
    ClearIndicesCacheRequest clearIndicesCacheRequest = new ClearIndicesCacheRequest()
      .indices("index-1")
      .fields("field-1")
      .queryCache(true)
      .fieldDataCache(true)
      .requestCache(true);
    assertThat(EsRequestDetails.computeDetailsAsString(clearIndicesCacheRequest))
      .isEqualTo("ES clear cache request on indices 'index-1' on fields 'field-1' with filter cache with field data cache with request cache");
  }