Merged two state-related unit tests