test_mix_states was refactored:

* code duplication was removed
* comment was added