title: WebApi unit testing the urlhelper is now null
body: <p>I have some unit tests that test the post in a WebApi project it was a WebApi 1.0 version, that I have upgraded to webapi 2.0, now when trying to construct the response, and add the location of the new resource the ApiController.Url returns null. Prior to upgrading these unit tests were passing.
  Here is the setup of the controller</p>
  
  <pre><code>var config = new HttpConfiguration();
  SetDependencyResolver(config, type);
  
  var request = new HttpRequestMessage(method, url);
  var route = config.Routes.MapHttpRoute("DefaultApi", "api/{controller}/{id}");
  var routeData =
      new HttpRouteData(
          route,
          new HttpRouteValueDictionary { { "controller", controllerName } });
  
  request.Properties[HttpPropertyKeys.HttpConfigurationKey] = config;
  request.Properties[HttpPropertyKeys.HttpRouteDataKey] = routeData;
  
  controller.Configuration = config;
  controller.ControllerContext = new HttpControllerContext(config, routeData, request);
  controller.Request = request;
  </code></pre>
  
  <p>Here is the call that is failing . Note it is the Url object that is returning null</p>
  
  <pre><code>response.Headers.Location = new Uri(Url.Link("DefaultApi", new { id = claimsCommand.Id }));
  </code></pre>
  
  <p>So what am I doing wrong now that I have upgrade to the latest version?</p>