@Before
  public void setUp() {
    cacheProvider = new LruCacheProvider(100);
    cache = new DefaultHttpCache(cacheProvider);
    service = new DefaultInvalidationService(cache, cacheProvider, new AtomicLong());
    appxToken = new FakeGadgetToken();
    appxToken.setAppId("AppX");
    appxToken.setOwnerId("OwnerX");
    appxToken.setViewerId("ViewerX");
    appyToken = new FakeGadgetToken();
    appyToken.setAppId("AppY");
    appyToken.setOwnerId("OwnerY");
    appyToken.setViewerId("ViewerY");

    signedRequest = new HttpRequest(URI);
    signedRequest.setAuthType(AuthType.SIGNED);
    signedRequest.setSecurityToken(appxToken);
    signedRequest.setOAuthArguments(new OAuthArguments());
    signedRequest.getOAuthArguments().setUseToken(OAuthArguments.UseToken.NEVER);
    signedRequest.getOAuthArguments().setSignOwner(true);
    signedRequest.getOAuthArguments().setSignViewer(true);

    fetcher = new DefaultRequestPipelineTest.FakeHttpFetcher();
    oauth = new DefaultRequestPipelineTest.FakeOAuthRequestProvider();
    requestPipeline =
        new DefaultRequestPipeline(
            fetcher,
            cache,
            oauth,
            new DefaultResponseRewriterRegistry(null, null),
            service,
            new HttpResponseMetadataHelper());
  }
 @Before
 public void setUp() throws Exception {
   FAKE_TOKEN.setAppId("12345");
   FAKE_TOKEN.setOwnerId("someowner");
   FAKE_TOKEN.setViewerId("someowner");
   converter = new BeanJsonConverter(Guice.createInjector());
   request =
       new BaseRequestItem(Maps.<String, String[]>newHashMap(), FAKE_TOKEN, converter, converter);
 }