private void oneOfUnconditionalWrappedResponseRequiredCheck(Expectations exp) { exp.allowing(serverSession).getAttribute(BridgeSession.LOCAL_ADDRESS); exp.will(returnValue(localAddress)); exp.allowing(serverSession).getReadHeader("X-Origin"); exp.will(returnValue(null)); exp.allowing(serverSession).getReadHeader("X-Next-Protocol"); exp.will(returnValue(null)); exp.allowing(serverSession).getParameter(".knp"); exp.will(returnValue(null)); exp.allowing(serverSession).getParameter(".kv"); exp.will(returnValue("10.05")); exp.allowing(serverSession).getParameter(".kl"); exp.will(returnValue("Y")); exp.allowing(serverSession).getParameter(".kac"); exp.will(returnValue(null)); ((IoSession) exp.allowing(serverSession)).getLocalAddress(); exp.will(returnValue(localAddress)); exp.allowing(serverSession).getLocalAddress(); exp.will(returnValue(localAddress)); exp.allowing(localAddress).getOption(ResourceAddress.NEXT_PROTOCOL); exp.will(returnValue("httpxe/1.1")); exp.allowing(serverSession).getMethod(); exp.will(returnValue(HttpMethod.POST)); exp.allowing(serverSession).setMethod(HttpMethod.POST); exp.allowing(serverSession).getFilterChain(); exp.will(returnValue(filterChain)); exp.allowing(filterChain) .addBefore( exp.with(Expectations.any(String.class)), exp.with(Expectations.any(String.class)), exp.with(Expectations.any(org.apache.mina.core.filterchain.IoFilter.class))); }