title: How to test DropWizard resource that returns a collection of objects?
body: <p>I'm building a service using DropWizard.  I have a endpoint that is expected to return a <code>List&lt;Person&gt;</code></p>
  
  <p>My unit tests looks like:</p>
  
  <pre><code>@Test
  public void testGetListOfPeople() {
  
  assertThat(
      resources.client().target("/people/?age=10").request().get(ArrayList&lt;Person&gt;.class))
      .containsAll(expectedList);
  }
  </code></pre>
  
  <p>However, <code>request().get</code> won't allow me to specify a parameterized collection. </p>
  
  <p>I've tried getting the response directly with:</p>
  
  <pre><code>r = resources.client().target("/people/?age=10").request().get()
  </code></pre>
  
  <p>but then its not clear how I convert <code>r</code> into a <code>List&lt;Person&gt;</code></p>
  
  <p>How can I update this test to work?</p>