State unit tests working