private static ElasticsearchResponse <T> GetElasticsearchResponse <T>(HttpStatusCode statusCode) where T : ResponseBase, new() { var response = new ElasticsearchResponse <T>((int)statusCode, new int[] { }); response.SetUri(new Uri("http://localhost:9200")); return(response.SetBody <T>(new T())); }