Added onConnect tests