@Test
void searchRequest() {

  request.getSourceBuilder().query(QueryBuilders.termQuery("name", "John"));
  assertEquals(
      new SearchRequest()
          .indices("test")
          .scroll(ElasticsearchScrollRequest.DEFAULT_SCROLL_TIMEOUT)
          .source(new SearchSourceBuilder().query(QueryBuilders.termQuery("name", "John"))),
      request.searchRequest());
}