anchor.diff:  postcondition(S, {call,?MODULE,append,[StreamID,_Data]}, Result) ->
       case lists:keymember(StreamID,1,S#state.streams) of
           true ->
  -            Result =:= {error,timeout};
  -        false ->
  -            Result =:= {error,closed}
  -    end;
  -postcondition(S, {call,?MODULE,simple_query,[StreamID,_Start,_End]}, Result) ->
  -    case Result of
  -        {ok, <<_PayloadLength:32,Payload/binary>>} ->
  -            Stream = lists:keysearch(StreamID,1,S#state.streams),
  -            case Stream of
  -                {value,{_StreamID, _StreamName, Expected}} ->
  -                    Observed = payload_to_list([],Payload),
  -                    Expected_Sorted = lists:sort([X || {_,X} <- Expected]),
  -                    Observed_Sorted = lists:sort([X || {_,X} <- Observed]),
  -                    Expected_Sorted =:= Observed_Sorted;
  -                _ ->
  -                    false
  -            end;
  -        _ ->
  -            false
  -    end;
  -postcondition(S, {call,?MODULE,all_since,[StreamID,Timestamp]}, Result) ->
  -    case Result of
  -        {ok, <<_PayloadLength:32,Payload/binary>>} ->
  -            Stream = lists:keysearch(StreamID,1,S#state.streams),
  -            case Stream of
  -                {value,{_StreamID, _StreamName, Expected}} ->
  -                    Observed = payload_to_list([],Payload),
  -                    Expected_Sorted = lists:sort([X || {Y,X} <- Expected, Y>Timestamp]),
  -                    Observed_Sorted = lists:sort([X || {_,X} <- Observed]),
  -                    Expected_Sorted =:= Observed_Sorted;
  -                _ ->
  -                    false
  -            end;
  -        _ ->
  -            false
  -    end;
  +            Result =:= casted;
  +        false ->
  +            Result =:= unregistered_stream
  +    end;
  +%postcondition(S, {call,?MODULE,simple_query,[StreamID,_Start,_End]}, Result) ->
  +%    case Result of
  +%        {ok, <<Payload/binary>>} ->
  +%            Stream = lists:keysearch(StreamID,1,S#state.streams),
  +%            case Stream of
  +%                {value,{_StreamID, _StreamName, Expected}} ->
  +%                    Observed = payload_to_list([],Payload),
  +%                    Expected_Sorted = lists:sort([X || {_,X} <- Expected]),
  +%                    Observed_Sorted = lists:sort([X || {_,X} <- Observed]),
  +%                    Expected_Sorted =:= Observed_Sorted;
  +%                _ ->
  +%                    false
  +%            end;
  +%        _ ->
  +%            false
  +%    end;
  +%postcondition(S, {call,?MODULE,all_since,[StreamID,Timestamp]}, Result) ->
  +%    case Result of
  +%        {ok, <<Payload/binary>>} ->
  +%            Stream = lists:keysearch(StreamID,1,S#state.streams),
  +%            case Stream of
  +%                {value,{_StreamID, _StreamName, Expected}} ->
  +%                    Observed = payload_to_list([],Payload),
  +%                    Expected_Sorted = lists:sort([X || {Y,X} <- Expected, Y>Timestamp]),
  +%                    Observed_Sorted = lists:sort([X || {_,X} <- Observed]),
  +%                    Expected_Sorted =:= Observed_Sorted;
  +%                _ ->
  +%                    false
  +%            end;
  +%        _ ->
  +%            false
  +%    end;
   postcondition(S, {call,?MODULE,request_stream,[_Size,StreamName]}, Result) ->
       Stream = lists:keysearch(StreamName,2,S#state.streams),
       case {Stream,Result} of
  -        {{value,{StreamID,_StreamName,_Data}},{ok,<<0,ID>>}} ->
  +        {{value,{StreamID,_StreamName,_Data}},ID} ->
               StreamID =:= ID;
  -        {false,{ok,_ID}} ->
  +        {false,_ID} ->
               true;
           _ ->
               false
       end;
   postcondition(S, {call,?MODULE,last_entry_at,[StreamID,Timestamp]}, Result) ->
       case Result of
  -        {ok, <<_PayloadLength:32,Payload/binary>>} ->
  +        {ok,<<Payload/binary>>} ->
               Stream = lists:keysearch(StreamID,1,S#state.streams),
               case Stream of
                   {value,{_StreamID, _StreamName, Data}} ->
  
positive.code: tcp_query(Host,Port,Packet) ->
      {ok, Socket} = gen_tcp:connect(Host, Port, [binary, {active,false}]),
      gen_tcp:send(Socket, Packet),
      Output = gen_tcp:recv(Socket,0,500),
      gen_tcp:close(Socket),
      Output.
  
  
negative.code:         {call,?MODULE,request_stream,[proper_utils:streamname()]},
          {call,?MODULE,request_stream_with_size,[pos_integer(),proper_utils:streamname()]},
          {call,?MODULE,append,[proper_utils:streamid(S),list(integer(32,255))]},
  %        {call,?MODULE,simple_query,[proper_utils:streamid(S),S#state.starttime,timestamp_wrapper()]},
  %        {call,?MODULE,all_since,[proper_utils:streamid(S),S#state.starttime]},
          {call,?MODULE,last_entry_at,[proper_utils:streamid(S),timestamp_wrapper()]}
      ]).
  
  