Added code for testing the network state machine.
Added code for testing the network state machine.