   test "presence" do
     assert Stanza.presence |> Stanza.to_xml == "<presence/>"
   end
+  
+  test "presence/1" do
+    assert Stanza.presence("subscribe") |> Stanza.to_xml == "<presence type='subscribe'/>"
+  end
 
   test "presence/2" do
     assert Stanza.presence("room@muc.localhost/nick", "unavailable") |> Stanza.to_xml ==

    assert Stanza.message("test@localhost", "chat", "Hello") |> Stanza.to_xml =~
      ~r"<message to='test@localhost' type='chat' id='(.*)' xml:lang='en'><body>Hello</body></message>"
  end
end

  alias Romeo.Stanza

  doctest Romeo.Stanza

  test "to_xml for IQ struct" do
    assert %IQ{to: "test@localhost", type: "get", id: "123"} |> Stanza.to_xml ==
      "<iq to='test@localhost' type='get' id='123'/>"
  end

  test "to_xml for Presence struct" do
    assert %Presence{to: "test@localhost", type: "subscribe"} |> Stanza.to_xml ==
    "<presence to='test@localhost' type='subscribe'/>"
  end

  test "start_stream with default xmlns" do
    assert Stanza.start_stream("im.wonderland.lit") |> Stanza.to_xml ==
