title: Mock UriInfo is not working
body: <p>I'm trying to setup a couple of unit tests but i'm stuck at this.
  This is my service class:</p>
  
  <pre><code>@Component
  @Scope("request")
  @Path("/subscriber/{accNo}/case/")
  public class ServiceRest {
          @Context
          private UriInfo uriInfo;
          @Autowired
          private ActivationCase actCase;
  
          @POST
          @Path("activation")
          public Response activate(@PathParam("accNo") String accNo, InputStream jSonInput) {
  
                 Integer order = actCase.activateMethod(accNo);
                 Link link = new Link("order", uriInfo.getBaseUriBuilder().path(OrderRest.class).path("" + order).build().toString(), "GET");
          }
  }
  </code></pre>
  
  <p>This is  my Test Class:</p>
  
  <pre><code>@RunWith(SpringJUnit4ClassRunner.class)
  @ContextConfiguration(locations = { "/myapp-context.xml" })
  @WebAppConfiguration
  @Ignore
  public class ServiceRestTest{
      @Autowired
      private ServiceRest restClient;
      @Autowired
      protected OrderServiceImpl orderService;
  
  
      @Test()
      public void testActivationCaseOK() {
          UriInfo uriInfo = Mockito.mock(UriInfo.class);
          UriBuilder uriBuilder = Mockito.mock(UriBuilder.class);
          Mockito.when(uriInfo.getBaseUriBuilder()).thenReturn(uriBuilder);           
          Mockito.when(orderService.readThings(Mockito.any(Acct.class))).
                         thenReturn(stuff);
  
          Mockito.when(orderService.maintainPlan(Mockito.any(Order.class))).
                         thenReturn(stuff2);
          Response response = restClient.activateMethod("111111114");
  }
  </code></pre>
  
  <p>Can anyone explain me why is uriInfo NULL?
  The mock is done, it should have returned my URIBuilder no?</p>
  
  <p>Thanks for you help</p>