title: Unit testing a Spring MVC controller that returns DeferredResult
body: <p>I am trying to test a Spring 3.2.1 controller that returns a list of DeferredResult objects. I was using the following test as a guide, but I am wondering if this test is an integration test and not a unit test?</p>
  
  <p><a href="https://github.com/SpringSource/spring-mvc-showcase/blob/master/src/test/java/org/springframework/samples/mvc/async/DeferredResultControllerTests.java" rel="nofollow">https://github.com/SpringSource/spring-mvc-showcase/blob/master/src/test/java/org/springframework/samples/mvc/async/DeferredResultControllerTests.java</a></p>
  
  <p>When I run my unit test, I get:</p>
  
  <p>Caused by: java.lang.UnsupportedOperationException: No async support in a pre-Servlet 3.0 runtime</p>
  
  <p>In researching this error, I believe it has to do with the async support included in the servlet 3.0 api being needed, which makes sense, but what Maven dependencies do I need to include to make the test pass? Has anybody written a successful spring mvc <em>controller</em> unit test for DeferredResults like the one in the link? (Again, I am assuming that the link above is a unit test and not an integration test). </p>
  
  <p>Thanks</p>