     end
 
     test "preserves empty fragments" do
-      [
-        "http://example.com#",
-        "http://example.com/#",
-        "http://example.com/test#",
-      ]
-      |> Enum.each(fn uri ->
-        assert URI.parse(uri).fragment == ""
-      end)
+      assert URI.parse("http://example.com#").fragment == ""
+      assert URI.parse("http://example.com/#").fragment == ""
+      assert URI.parse("http://example.com/test#").fragment == ""
     end
   end
 
   test "default_port/1,2" do
     assert URI.default_port("http") == 80
+
     try do
       URI.default_port("http", 8000)
       assert URI.default_port("http") == 8000

    assert to_string(URI.parse("http://[2001:db8::]")) == "http://[2001:db8::]"

    assert URI.to_string(URI.parse("http://google.com")) == "http://google.com"
    assert URI.to_string(URI.parse("//user:password@google.com/")) == "//user:password@google.com/"
  end

  test "merge/2" do

    end

    test "works with HTTP scheme" do
      expected_uri = %URI{
        scheme: "http",
        host: "foo.com",
        path: "/path/to/something",
        query: "foo=bar&bar=foo",
        fragment: "fragment",
        port: 80,
        authority: "foo.com",
        userinfo: nil
      }

      assert URI.parse("http://foo.com/path/to/something?foo=bar&bar=foo#fragment") ==
               expected_uri
    end

    test "works with HTTPS scheme" do
      expected_uri = %URI{
        scheme: "https",
        host: "foo.com",
        authority: "foo.com",
        query: nil,
        fragment: nil,
        port: 443,
        path: nil,
        userinfo: nil
      }

      assert URI.parse("https://foo.com") == expected_uri
    end

    test "works with \"file\" scheme" do
      expected_uri = %URI{
        scheme: "file",
        host: nil,
        path: "/foo/bar/baz",
        userinfo: nil,
        query: nil,
        fragment: nil,
        port: nil,
        authority: nil
      }

      assert URI.parse("file:///foo/bar/baz") == expected_uri
    end

    test "works with FTP scheme" do
      expected_uri = %URI{
        scheme: "ftp",
        host: "private.ftp-server.example.com",
        userinfo: "user001:password",
        authority: "user001:password@private.ftp-server.example.com",
        path: "/my_directory/my_file.txt",
        query: nil,
        fragment: nil,
        port: 21
      }

      ftp = "ftp://user001:password@private.ftp-server.example.com/my_directory/my_file.txt"
      assert URI.parse(ftp) == expected_uri
    end

    test "works with SFTP scheme" do
      expected_uri = %URI{
        scheme: "sftp",
        host: "private.ftp-server.example.com",
        userinfo: "user001:password",
        authority: "user001:password@private.ftp-server.example.com",
        path: "/my_directory/my_file.txt",
        query: nil,
        fragment: nil,
        port: 22
      }

      sftp = "sftp://user001:password@private.ftp-server.example.com/my_directory/my_file.txt"
      assert URI.parse(sftp) == expected_uri
    end

    test "works with TFTP scheme" do
      expected_uri = %URI{
        scheme: "tftp",
        host: "private.ftp-server.example.com",
        userinfo: "user001:password",
        authority: "user001:password@private.ftp-server.example.com",
        path: "/my_directory/my_file.txt",
        query: nil,
        fragment: nil,
        port: 69
      }

      tftp = "tftp://user001:password@private.ftp-server.example.com/my_directory/my_file.txt"
      assert URI.parse(tftp) == expected_uri
    end

    test "works with LDAP scheme" do
      expected_uri = %URI{
        scheme: "ldap",
        host: nil,
        authority: nil,
        userinfo: nil,
        path: "/dc=example,dc=com",
        query: "?sub?(givenName=John)",
        fragment: nil,
        port: 389
      }

      assert URI.parse("ldap:///dc=example,dc=com??sub?(givenName=John)") == expected_uri

      expected_uri = %URI{
        scheme: "ldap",
        host: "ldap.example.com",
        authority: "ldap.example.com",
        userinfo: nil,
        path: "/cn=John%20Doe,dc=foo,dc=com",
        fragment: nil,
        port: 389,
        query: nil
      }

      assert URI.parse("ldap://ldap.example.com/cn=John%20Doe,dc=foo,dc=com") == expected_uri
    end

    test "splits authority" do
      expected_uri = %URI{
        scheme: "http",
        host: "foo.com",
        path: nil,
        query: nil,
        fragment: nil,
        port: 4444,
        authority: "foo:bar@foo.com:4444",
        userinfo: "foo:bar"
      }

      assert URI.parse("http://foo:bar@foo.com:4444") == expected_uri

      expected_uri = %URI{
        scheme: "https",
        host: "foo.com",
        path: nil,
        query: nil,
        fragment: nil,
        port: 443,
        authority: "foo:bar@foo.com",
        userinfo: "foo:bar"
      }

      assert URI.parse("https://foo:bar@foo.com") == expected_uri

      expected_uri = %URI{
        scheme: "http",
        host: "foo.com",
        path: nil,
        query: nil,
        fragment: nil,
        port: 4444,
        authority: "foo.com:4444",
        userinfo: nil
      }

      assert URI.parse("http://foo.com:4444") == expected_uri
    end

    test "can parse bad URIs" do
