test that listens and connects