title: Spring: I wish to create a junit test for a web application - WebApplicationContext needed
body: <p>I am writing a junit test in order to (surprisingly) test a part of my app as a standalone.</p>
  
  <p>Thing is I execute the following line in a constructor being invoked in the unit test:</p>
  
  <pre><code>WebApplicationContext webApplicationContext = ContextLoader.getCurrentWebApplicationContext();
  </code></pre>
  
  <p>How would I go about to set up a web context when running a simple unit test?</p>
  
  <p>Thanks</p>