function verifyStatesPreserved(lastInternalStates, statusDisplays) {
  let key;
  for (key in statusDisplays) {
    if (!statusDisplays.hasOwnProperty(key)) {
      continue;
    }
    if (lastInternalStates[key]) {
      expect(lastInternalStates[key]).toEqual(
        statusDisplays[key].getInternalState(),
      );
    }
  }
}
For all statusDisplays that existed in the previous iteration of the
sequence, verify that the state has been preserved. `StatusDisplay` contains
a unique number that allows us to track internal state across ordering
movements.