anchor.diff:      {next_state, at_rest, StateData, [{reply, From, Result}]};
   receive_data(cast, {gun_error, _Pid, StreamRef, _Reason},
                #{stream := StreamRef} = StateData) ->
  -    {next_state, at_rest, StateData, 0};
  +    {next_state, at_rest, StateData};
   receive_data(info, Event, StateData) ->
       handle_info(Event, receive_data, StateData).
   
   %% @private
   %% @doc Chunked data response
   -spec receive_chunk({call, gen_statem:from()} | cast | info, term(), statedata()) ->
  -    {stop, {error, any()}, atom(), statedata()} |
  -    {next_state, atom(), statedata()} |
  -    {next_state, atom(), statedata(), timeout()}.
  +    {keep_state_and_data, [{reply, gen_statem:from(), {error, {unexpected, atom()}}}]} |
  +    {keep_state, statedata(), [{reply, gen_statem:from(), list()}]} |
  +    {keep_state, statedata(), [{timeout, timeout(), get_work}]} |
  +    {next_state, atom(), statedata(), [{timeout, 0, 0}]} |
  +    {next_state, atom(), statedata()}.
   receive_chunk({call, From}, Event, StateData) ->
       enqueue_work_or_stop(receive_chunk, Event, From, StateData);
   receive_chunk(cast, {'DOWN', _, _, _, _Reason}, _StateData) ->
  
positive.code:     NewStateData = manage_chunk(IsFin, StreamRef, Data, StateData),
      case IsFin of
          fin ->
              {next_state, at_rest, NewStateData, 0};
          nofin ->
              {next_state, receive_chunk, NewStateData}
      end;
  receive_chunk(cast, {gun_error, _Pid, _StreamRef, _Reason}, StateData) ->
      {next_state, at_rest, StateData, 0};
  receive_chunk(info, Event, StateData) ->
      handle_info(Event, receive_chunk, StateData).
  
  
negative.code: 
  %% @private
  -spec enqueue_work_or_stop(atom(), term(), gen_statem:from(), statedata(), timeout()) ->
      {keep_state_and_data, [{reply, gen_statem:from(), {error, {unexpected, atom()}}}]} |
      {keep_state, statedata(), [{timeout, timeout(), get_work}]}.
  enqueue_work_or_stop(_StateName, Event, From, StateData, Timeout) ->
      case create_work(Event, From) of
  