Created unit test for `state`