Add unit test for connection.rb