anchor.diff:      {stop, normal, StateData};
   
   handle_info(Message, _StateName, StateData) ->
  -    lager:debug("Unexpected message: ~p",[Message]),
  +    lager:info("Unexpected message: ~p",[Message]),
       {stop,badmsg,StateData}.
   
   handle_event(_Event, _StateName, StateData) ->
  
positive.code:                            receive
                                 {done, normal} ->
                                     ok;
                                 _ ->
                                     {error}
                                     %%TODO: Retry if needed
                             after ?TIMEOUT ->
                                     {error, timeout}
                                     %%TODO: Retry if needed
                             end
  
negative.code:     {stop, normal, State}.
  
  handle_info({tcp, Socket, Bin}, StateName, #state{socket=Socket} = StateData) ->
      inet:setopts(Socket, [{active, once}]),
      gen_fsm:send_event(self(), binary_to_term(Bin)),
      {next_state, StateName, StateData}; 
  
  