final String uri = "http://localhost:7001/genie/v2/jobs";
final Multimap<String, String> queryParams = ArrayListMultimap.create();
queryParams.put("key1", "value1");
queryParams.put("key1", "value2");
queryParams.put("key2", "value1");
final HttpRequest validRequest = BaseGenieClient.buildRequest(
HttpRequest.Verb.GET, uri, queryParams, null);
Assert.assertEquals(HttpRequest.Verb.GET, validRequest.getVerb());
Assert.assertEquals(uri, validRequest.getUri().toString());
Assert.assertNull(validRequest.getEntity());
Assert.assertEquals(1, validRequest.getHeaders().get(HttpHeaders.CONTENT_TYPE).size());
Assert.assertTrue(validRequest.getHeaders().get(HttpHeaders.CONTENT_TYPE).contains(MediaType.APPLICATION_JSON));
Assert.assertEquals(1, validRequest.getHeaders().get(HttpHeaders.ACCEPT).size());
Assert.assertTrue(validRequest.getHeaders().get(HttpHeaders.ACCEPT).contains(MediaType.APPLICATION_JSON));
Assert.assertFalse(validRequest.getQueryParams().isEmpty());
Assert.assertEquals(2, validRequest.getQueryParams().get("key1").size());
Assert.assertTrue(validRequest.getQueryParams().get("key1").contains("value1"));
Assert.assertTrue(validRequest.getQueryParams().get("key1").contains("value2"));
Assert.assertEquals(1, validRequest.getQueryParams().get("key2").size());
Assert.assertTrue(validRequest.getQueryParams().get("key2").contains("value1"));
}