@Test
public void testAddRequest() {
// addRequest
HttpServletRequest httpServletRequest1 = mocksControl.createMock(HttpServletRequest.class);
HttpServletRequest httpServletRequest2 = mocksControl.createMock(HttpServletRequest.class);
Continuation continuation1 = mocksControl.createMock(Continuation.class);
Continuation continuation2 = mocksControl.createMock(Continuation.class);
expect(httpServletRequest1.getAttribute(Continuation.ATTRIBUTE)).andReturn(continuation1);
expectLastCall().atLeastOnce();
expect(httpServletRequest2.getAttribute(Continuation.ATTRIBUTE)).andReturn(continuation2);
expectLastCall().atLeastOnce();
continuation1.setTimeout(anyLong());
continuation1.suspend();
Capture<BoshRequest> br1 = new Capture<BoshRequest>();
continuation1.setAttribute(eq("request"), EasyMock.<BoshRequest> capture(br1));
continuation2.setTimeout(anyLong());
continuation2.suspend();
Capture<BoshRequest> br2 = new Capture<BoshRequest>();
continuation2.setAttribute(eq("request"), EasyMock.<BoshRequest> capture(br2));
continuation1.addContinuationListener(EasyMock.<ContinuationListener> anyObject());
continuation2.addContinuationListener(EasyMock.<ContinuationListener> anyObject());
Stanza body = new StanzaBuilder("body", NamespaceURIs.XEP0124_BOSH).build();
expect(boshHandler.addAttribute(eq(body), eq("ack"), Long.toString(EasyMock.anyLong()))).andReturn(body);
// write0