anchor.diff:          , audit_readGT/4    %% (User, Channel, TS1, Limit)          read audit info after Timestamp1, resturn a list of maps with Limit results or less
           , audit_readGT/5    %% (User, Channel, Item, TS1, Limit)    read audit info after Timestamp1, return Limit results or less
           , hist_read/3       %% (User, Channel, KeyList)             return history list as maps for given keys
  +        , search_deleted/6  %% (User, Channel, Ckey1, Ckey2, Text, L)   from key at or after CKey1 to last key before CKey2, finds {K,V} with text in V
           , remove/3          %% (User, Channel, RowList)             delete a resource will fail if it was modified, rows should be in map format
           , remove/4          %% (User, Channel, RowList, Opts)       delete a resource will fail if it was modified, rows should be in map format, with trigger options
           , delete/3          %% (User, Channel, KeyTable)            do not complain if keys do not exist
  
positive.code:             hist_read(User, Channel, DecodedKeys)
      end.
  
  %% Data Access per key range
  
  match_val(T) when is_tuple(T) -> {const,T};
  
negative.code:         ?assertEqual(3, length(HistResult)),
          ?assertEqual([History1, History2, History3], HistResult),
  
          %% Search history for test
          HistSearchResult1 = search_deleted(system, ?Channel, <<"test">>, [], maps:get(ckey, Map3),5),
          ?assertEqual(3, length(HistSearchResult1)),
  
          %% Search for 150
          HistSearchResult2 = search_deleted(system, ?Channel, <<"150">>, [], maps:get(ckey, Map3),5),
          ?assertEqual(1, length(HistSearchResult2)),
          ?assertEqual([{maps:get(ckey, Map3), maps:get(cvalue, Map3Upd)}], HistSearchResult2),
  
          %% Search history for limit
          HistSearchResult3 = search_deleted(system, ?Channel, <<"test">>, [], maps:get(ckey, Map3),2),
          ?assertEqual(2, length(HistSearchResult3)),
  
          %% Using sext encoded Keys
          EncodedKeys = [imem_datatype:term_to_binterm(maps:get(ckey, Map1))
                        ,imem_datatype:term_to_binterm(maps:get(ckey, Map2))
  