anchor.diff:      Elements = [create_node_element(NodeName) | configure_node_form(ConfigFields, undefined)],
       pubsub_iq(<<"set">>, User, Id, NodeAddr, Elements).
   
  --spec request_configuration(escalus_utils:jid_spec(), binary(), pubsub_node_id()) -> exml:element().
  -request_configuration(User, Id, {NodeAddr, NodeName}) ->
  +-spec delete_node(escalus_utils:jid_spec(), binary(), pubsub_node_id()) -> exml:element().
  +delete_node(User, Id, {NodeAddr, NodeName}) ->
  +    Elements = [delete_element(NodeName)],
  +    pubsub_owner_iq(<<"set">>, User, Id, NodeAddr, Elements).
  +
  +%% ---------------- configuration ----------------
  +
  +-spec get_configuration(escalus_utils:jid_spec(), binary(), pubsub_node_id()) -> exml:element().
  +get_configuration(User, Id, {NodeAddr, NodeName}) ->
       Elements = [#xmlel{ name = <<"configure">>,
                           attrs = [{<<"node">>, NodeName}] }],
       pubsub_owner_iq(<<"get">>, User, Id, NodeAddr, Elements).
   
  --spec configure_node(escalus_utils:jid_spec(), binary(), pubsub_node_id(),
  -                     [{binary(), binary()}]) ->
  -                            exml:element().
  -configure_node(User, Id, {NodeAddr, NodeName}, ConfigFields) ->
  +-spec set_configuration(escalus_utils:jid_spec(), binary(),
  +                        pubsub_node_id(), [{binary(), binary()}]) ->
  +    exml:element().
  +set_configuration(User, Id, {NodeAddr, NodeName}, ConfigFields) ->
       Elements = configure_node_form(ConfigFields, NodeName),
       pubsub_owner_iq(<<"set">>, User, Id, NodeAddr, Elements).
   
  --spec request_affiliations(escalus_utils:jid_spec(), binary(), pubsub_node_id()) -> exml:element().
  -request_affiliations(User, Id, {NodeAddr, NodeName}) ->
  +%% ---------------- affiliations ----------------
  +
  +-spec get_affiliations(escalus_utils:jid_spec(), binary(), pubsub_node_id()) -> exml:element().
  +get_affiliations(User, Id, {NodeAddr, NodeName}) ->
       Elements = [#xmlel{ name = <<"affiliations">>,
                           attrs = [{<<"node">>, NodeName}] }],
       pubsub_owner_iq(<<"get">>, User, Id, NodeAddr, Elements).
  
positive.code:                   children = [XEl] },
      escalus_stanza:from(Msg, escalus_utils:get_jid(User)).
  
  -spec request_pending_subscriptions(escalus_utils:jid_spec(), binary(),
                                      pubsub_node_id() | binary()) -> exml:element().
  request_pending_subscriptions(User, Id, {NodeAddr, NodeName}) ->
      Fields = [ encode_form_field(<<"pubsub#node">>, NodeName) ],
      Payload = [ escalus_stanza:x_data_form(<<"submit">>, Fields) ],
      Node = <<"http://jabber.org/protocol/pubsub#get-pending">>,
      CommandIQ = escalus_stanza:adhoc_request(Node, Payload),
      escalus_stanza:from(escalus_stanza:set_id(escalus_stanza:to(CommandIQ, NodeAddr), Id), User);
  request_pending_subscriptions(User, Id, NodesAddr) ->
      Node = <<"http://jabber.org/protocol/pubsub#get-pending">>,
      CommandIQ = escalus_stanza:adhoc_request(Node, []),
      escalus_stanza:from(escalus_stanza:set_id(escalus_stanza:to(CommandIQ, NodesAddr), Id), User).
  
  -spec publish(escalus_utils:jid_spec(), binary(), pubsub_node_id()) -> exml:element().
  publish(User, Id, {NodeAddr, NodeName}) ->
      Elements = [publish_element(NodeName, undefined)],
      pubsub_iq(<<"set">>, User, Id, NodeAddr, Elements).
  
  -spec publish(escalus_utils:jid_spec(), binary(), exml:element(), binary(), pubsub_node_id()) ->
                       exml:element().
  publish(User, ItemId, ContentElement, Id, {NodeAddr, NodeName}) ->
      ItemElement = item_element(ItemId, ContentElement),
      Elements = [publish_element(NodeName, ItemElement)],
      pubsub_iq(<<"set">>, User, Id, NodeAddr, Elements).
  
  -spec retract(escalus_utils:jid_spec(), binary(), pubsub_node_id(), binary()) -> exml:element().
  retract(User, Id, {NodeAddr, NodeName}, ItemId) ->
      Elements = [retract_item(NodeName, ItemId)],
      pubsub_iq(<<"set">>, User, Id, NodeAddr, Elements).
  
  -spec request_all_items(escalus_utils:jid_spec(), binary(), pubsub_node_id()) -> exml:element().
  request_all_items(User, Id, {NodeAddr, NodeName}) ->
      Elements = [items_element(NodeName)],
      pubsub_iq(<<"get">>, User, Id, NodeAddr, Elements).
  
  -spec purge_all_items(escalus_utils:jid_spec(), binary(), pubsub_node_id()) -> exml:element().
  purge_all_items(User, Id, {NodeAddr, NodeName}) ->
      Elements = [purge_element(NodeName)],
      pubsub_owner_iq(<<"set">>, User, Id, NodeAddr, Elements).
  
  -spec retrieve_user_subscriptions(escalus_utils:jid_spec(), binary(),
                                    pubsub_node_id() | binary()) -> exml:element().
  retrieve_user_subscriptions(User, Id, Node) ->
      {Element, NodeAddr}
      = case Node of
            {NodeAddr0, NodeName} -> {subscriptions_element(NodeName, []), NodeAddr0};
  
negative.code: %%-----------------------------------------------------------------------------
  %% Request construction
  %%-----------------------------------------------------------------------------
  
  %% ---------------- disco ----------------
  
  -spec discover_nodes(escalus_utils:jid_spec(), binary(), binary() | pubsub_node_id()) ->
                              exml:element().
  discover_nodes(User, Id, {NodeAddr, NodeName}) ->
      QueryElement = escalus_stanza:query_el(?NS_DISCO_ITEMS, [{<<"node">>, NodeName}], []),
      iq(<<"get">>, User, Id, NodeAddr, [QueryElement]);
  discover_nodes(User, Id, NodeAddr) ->
      QueryElement = escalus_stanza:query_el(?NS_DISCO_ITEMS, [], []),
      iq(<<"get">>, User, Id, NodeAddr, [QueryElement]).
  
  %% ---------------- create & delete ----------------
  
  -spec create_node(escalus_utils:jid_spec(), binary(), pubsub_node_id()) -> exml:element().
  create_node(User, Id, Node) ->
  