add test for connect handler