title: Integration Tests of Spring MVC controller
body: <p>I have a controller which returns XML data in response of a call. Below is the code</p>
  
  <pre><code>@RequestMapping(value = "/balance.xml",method = RequestMethod.GET,produces="application/xml")
  public AccountBalanceList getAccountBalanceList(@RequestParam("accountId") Integer accountId)
  {
      AccountBalanceList accountBalanceList = new AccountBalanceList();
      List&lt;AccountBalance&gt; list = new ArrayList&lt;AccountBalance&gt;();
      list = accountService.getAccountBalanceList(accountId);
  
      accountBalanceList.setList(list);
      return accountBalanceList;
  }
  </code></pre>
  
  <p>accountBalanceList is annotated with xml.The response I am getting from this call is like this</p>
  
  <pre><code>&lt;points&gt;
   &lt;point&gt;
    &lt;balance&gt;$1134.99&lt;/balance&gt;
    &lt;lots&gt;10000.0&lt;/lots&gt;
    &lt;onDate&gt;2012-11-11 15:44:00&lt;/onDate&gt;
   &lt;/point&gt;
  &lt;/points&gt;
  </code></pre>
  
  <p>I want to write integration test for this controller call. I know how to test a controller with JSON response but I don't know how to test when the response is in XML.Any help will be appreciated.</p>
  
  <p>Regards</p>