Add more tests for connection direction flipping