Tests/Implementation for state change logic