@Test
  public void testRemoveResource() throws ServletException, NamespaceException {
    when(rootApplication.hasResources()).thenReturn(true);
    Object resource = new Object();
    Object resource2 = new Object();

    jerseyContext.addResource(resource);
    jerseyContext.addResource(resource2);
    jerseyContext.removeResource(resource);

    verify(rootApplication).addResource(resource);
    verify(rootApplication).addResource(resource2);
    verify(rootApplication).removeResource(resource);
    verify(httpService)
        .registerServlet(
            eq("/test"),
            any(ServletContainer.class),
            any(Dictionary.class),
            any(HttpContext.class));
    verify(httpService, never()).unregister("/test");
  }