title: RestAssured - passing list as QueryParam
body: <p>I have a REST-service that takes in a number of query-params, amongst other things a list of strings. I use RestAssured to test this REST-service, but I am experiencing some problems with passing the list to the service.</p>
  
  <p>My REST-service:</p>
  
  <pre><code>@GET
  @Consumes(Mediatyper.JSON_UTF8)
  @Produces(Mediatyper.JSON_UTF8)
  public AggregerteDataDTO doSearch(@QueryParam("param1") final String param1,
                                    @QueryParam("param2") final String param2,
                                    @QueryParam("list") final List&lt;String&gt; list) {
  </code></pre>
  
  <p>My RestAssured test:</p>
  
  <pre><code>public void someTest() {
      final  String url = BASE_URL + "/search?param1=2014&amp;param2=something&amp;list=item1&amp;list=item2";
  
      final String json = given()
              .expect()
              .statusCode(200)
              .when()
              .get(url)
              .asString();
  </code></pre>
  
  <p>When I print the url, it looks like this:</p>
  
  <p><a href="http://localhost:9191/application/rest/search?param1=2014&amp;param2=something&amp;list=item1&amp;list=item2" rel="noreferrer">http://localhost:9191/application/rest/search?param1=2014&amp;param2=something&amp;list=item1&amp;list=item2</a></p>
  
  <p>When I try this url in my browser, the REST-service correctly gets a list containing 2 elements. But, when run through my RestAssured-test, only the latter of the params are noticed, giving me a list of 1 element (containing "item2").</p>