anchor.diff:  count_roster_items(Num, Stanza) ->
       Num == length(get_roster_items(Stanza)).
   
  --spec is_error(binary(), binary(), xmlterm()) -> boolean().
  +-spec is_error(stanza_type(), binary(), xmlterm()) -> boolean().
   is_error(Type, Condition, Stanza) ->
       Error = exml_query:subelement(Stanza, <<"error">>),
       has_type(<<"error">>, Stanza)
  
positive.code:     exml_query:path(Error, [{element, bin(Condition)},
                              {attr, <<"xmlns">>}]) == ?NS_STANZA_ERRORS.
  
  -spec is_stream_error(binary(), binary(), xmlterm()) -> boolean().
  is_stream_error(Type, Text, Stanza) ->
      Stanza#xmlel.name =:= <<"stream:error">>
      andalso
  
negative.code: has_no_such_item(JID, Stanza) ->
      not has_item(JID, Stanza).
  
  -spec has_identity(binary(), stanza_type(), xmlterm()) -> boolean().
  has_identity(Category, Type, Stanza) ->
      Idents = exml_query:paths(Stanza, [{element, <<"query">>},
                                         {element, <<"identity">>}]),
  