@Test
public void fetchReason() {

  when(elasticsearchException.getMessage()).thenReturn("error");
  ElasticsearchErrorMessage errorMessage =
      new ElasticsearchErrorMessage(elasticsearchException, SERVICE_UNAVAILABLE.getStatus());
  assertEquals("Error occurred in Elasticsearch engine: error", errorMessage.fetchReason());
}