state transition testing with example