added a basic test for state change functionality