@Mock Metrics metrics;
@Test
public void testIntegration() throws Exception {
StashAction stash = new StashAction();
stash.response = new Response(sleeper, servletResponse, metrics);
stash.memcache = new Memcache(null, metrics);
StringWriter stashWriter = new StringWriter();
when(servletResponse.getWriter()).thenReturn(new PrintWriter(stashWriter));
stash.tempUrlFactory = new TempUrlFactory("http://testing.example/stash");
stash.lazyRandomToken = lazy("token");
stash.status = 234;
stash.payload = "foo";
stash.run();
TempAction temp = new TempAction();
temp.response = new Response(sleeper, servletResponse, metrics);
temp.memcache = new Memcache(null, metrics);
StringWriter tempWriter = new StringWriter();
when(servletResponse.getWriter()).thenReturn(new PrintWriter(tempWriter));
temp.requestPath = stashWriter.toString().replaceFirst(".*/", "");
temp.run();