Fixed unit test.
Moved state validation to MutableState.