MockClusteredSessionManager mgr = new MockClusteredSessionManager();
mgr.setJvmRoute(JVM_ROUTE);
JvmRouteValve jvmRouteValve = new JvmRouteValve(mgr);
MockValve mockValve = new MockValve();
jvmRouteValve.setNext(mockValve);
MockRequest req = new MockRequest(mgr);
Session session = mgr.createSession(FAILOVER_ID);
req.setSession(session);
req.setRequestedSessionId(session.getId());
req.setRequestedSessionIdFromURL(true);
Response res = new Response();
jvmRouteValve.invoke(req, res);
assertSame(req, mockValve.getInvokedRequest());
assertSame(res, mockValve.getInvokedResponse());
assertEquals(NON_FAILOVER_ID, session.getId());
assertEquals(null, mgr.getNewCookieIdSession());
}