Tests for opening a connection