moved and updated TestConnection