ResponseCorrelator respCorr = (ResponseCorrelator) connection.getTransport();
MutexTransport mutexTrans = (MutexTransport) respCorr.getNext();
FailoverTransport failoverTrans = (FailoverTransport) mutexTrans.getNext();
Field stateTrackerField = FailoverTransport.class.getDeclaredField("stateTracker");
stateTrackerField.setAccessible(true);
ConnectionStateTracker stateTracker = (ConnectionStateTracker) stateTrackerField.get(failoverTrans);
Field statesField = ConnectionStateTracker.class.getDeclaredField("connectionStates");
statesField.setAccessible(true);
ConcurrentHashMap<ConnectionId, ConnectionState> states =
(ConcurrentHashMap<ConnectionId, ConnectionState>) statesField.get(stateTracker);