response = closeableHttpClient().execute(request);
assertThat(response.getStatusLine().getStatusCode(), equalTo(RestStatus.UNAUTHORIZED.getStatus()));
}
public static HttpRequestBuilder httpClient() {
return new HttpRequestBuilder(HttpClients.createDefault())
.host("localhost").port(9200);
}