Wrote test to make sure history stores states in correct order.