Added some connection state unit tests