Description
ResponseStateManager implementation deals with state / structure logic, but this is not valid anymore, because that is now an implementation detail.
We need to clean up all that code and just let a simple and efficient implementation there, so we can move to the next step.
Additionally, it could be good to create StateCacheFactory abstraction to deal with client /server differences, and divide StateCacheImpl into two, apply strategy pattern (because now we understand clearly how the algorithm should work).
Now StateCache is StateCache<K,V> where K is the token that allow it to restore the state V.