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_search_SearchScrollRequest() {
    SearchScrollRequest scrollRequest = Requests.searchScrollRequest("scroll-id")
      .scroll(TimeValue.ZERO);
    assertThat(EsRequestDetails.computeDetailsAsString(scrollRequest))
      .isEqualTo("ES search scroll request for scroll id 'Scroll{keepAlive=0s}'");
  }