Finishing latests unit test for state, and state.protocol.js