title: Abstracting the Request object
body: <p>I'm running some basic unit tests on an MVC4 application. Within one of the main controller methods there is a call to Request.UserHostAddress.</p>
  
  <p>However when I run my unit test it fails (Object null reference) which I presume is because the Request object has no context.</p>
  
  <p>What's the bets thing to do in this situation. I read a suggestion about abstracting the Request object, but im not sure how, or whether this is the best approach?</p>
  
  <p>Advice (and possible solution) would be appreciated.</p>