@Test
public void testFailoverMismatchBadSessionFromURL() throws Exception {
log.info("Enter testFailoverMismatchBadSessionFromURL");
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(NON_FAILOVER_ID);
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());
}