for (int i = 0; i < 5; i++) {
m.put("param_" + i, Arrays.asList("value_" + i));
}
Request request = new RequestBuilder("POST").setUrl(getTargetUrl()).setHeaders(h).setFormParams(m).setVirtualHost("localhost:" + port1).build();
Response response = client.executeRequest(request, new AsyncCompletionHandlerAdapter()).get();
assertEquals(response.getStatusCode(), 200);
if (response.getHeader("X-Host").startsWith("localhost")) {
assertEquals(response.getHeader("X-Host"), "localhost:" + port1);
} else {