anchor.diff:  -spec unregister_procedure( Pid :: pid(), ProcedureId :: non_neg_integer(), State :: #state{}) -> {ok} | {error,Details :: list(), Reason :: atom()}.
   unregister_procedure(Pid,ProcedureId,State) ->
     Session = get_session_from_pid(Pid,State),
  -  case remove_session_from_procedure(Session,ProcedureId,State) of
  -    ok -> {ok};
  -    not_found -> {error,[{}],no_such_registration}
  +  case lists:member(ProcedureId,Session#session.registrations) of
  +    true ->
  +      ok = remove_session_from_procedure(Session,ProcedureId,State),
  +      {ok};
  +    false ->
  +      {error,[{}],no_such_registration}
     end.
   
   
  
positive.code:   end.
  
  -spec remove_session_from_procedure( Session :: #session{}, ProcedureId :: non_neg_integer(), State :: #state{}) -> ok | not_found.
  remove_session_from_procedure(Session,ProcedureId,#state{p=P,sess=Sessions}) ->
    SessionId = Session#session.id,
  
    case lists:member(ProcedureId,Session#session.registrations) of
      false ->
        not_found;
  
      true ->
        ets:delete(P,ProcedureId),
        ets:update_element(Sessions,SessionId,{#session.registrations,lists:delete(ProcedureId,Session#session.registrations)}),
        ok
    end.
  
  -spec create_invocation(Session :: #session{}, CalleeSession :: #session{}, RequestId :: non_neg_integer(), Procedure :: #procedure{}, Options :: list(), Arguments :: list(), ArgumentsKw :: list(), State :: #state{}) -> {ok, non_neg_integer()}.
  create_invocation(Session,CalleeSession,RequestId,Procedure,Options,Arguments,ArgumentsKw,#state{i=I}=State) ->
  
negative.code: remove_session_from_topic(Session,TopicId,#state{t=T,sess=Sessions}) ->
    SessionId = Session#session.id,
    [Topic] = ets:lookup(T,TopicId),
    ets:update_element(T,TopicId,{#topic.subscribers,lists:delete(SessionId,Topic#topic.subscribers)}),
    ets:update_element(Sessions,SessionId,{#session.subscriptions,lists:delete(TopicId,Session#session.subscriptions)}),
    ok.
  
  
  -spec create_procedure(Url :: binary(), Options :: list(), Session :: #session{}, State :: #state{} ) -> {ok,non_neg_integer()}.
  