title: how to set real path for mockservletcontext in junit
body: <p>I need to set real path for mockservletcontext so that I could access the path using </p>
  
  <p>getServletContext().getRealPath("/").</p>
  
  <p>This is the following code I used in Junit</p>
  
  <pre><code>MockServletContext context = new MockServletContext("/Users/pradeep/Desktop/", null);
  SomeImpl userService =  (SomeImpl) applicationContext.getBean("someBean");
  userService.setServletContext(context);
  </code></pre>
  
  <p>but still getServletContext().getRealPath("/") returns me null.</p>
  
  <p>Any suggestions to set path for a mockservlet?</p>