Add tests for invalid connections