anchor.diff:          write_scrubbed_to_db(?TEST_DB:new(randoms:getRandomString()), Data),
       ExpInInterval = [El || El <- ScrubbedData,
                              is_in(Interval, element(1, El))],
  -    ExpInIntervalCounted = lists:sublist(lists:keysort(1, ExpInInterval), MaxNum),
  +    ExpInIntervalCounted = lists:sublist(ExpInInterval, MaxNum),
       AllFold = ?TEST_DB:foldl(DB1, fun(E, AccIn) -> [E | AccIn] end, []),
       IntervalFold = ?TEST_DB:foldl(DB1,
                                    fun(E, AccIn) -> [E | AccIn] end,
  
positive.code:         write_scrubbed_to_db(?TEST_DB:new(randoms:getRandomString()), Data),
      ExpInInterval = [El || El <- ScrubbedData,
                             is_in(Interval, element(1, El))],
      ExpInIntervalCounted = lists:sublist(lists:reverse(lists:keysort(1, ExpInInterval)), MaxNum),
      AllFold = ?TEST_DB:foldr(DB1, fun(E, AccIn) -> [E | AccIn] end, []),
      IntervalFold = ?TEST_DB:foldr(DB1,
                                   fun(E, AccIn) -> [E | AccIn] end,
  
negative.code:     %% Entries should be unique
      SortFun = fun(A, B) -> (element(1, A) < element(1, B)) orelse
                             (element(1, A) ?EQ element(1, B)) end,
      lists:usort(SortFun, Data).
  
  check_db(DB, ExpData, Note) ->
      InDb = ?TEST_DB:foldl(DB, fun(E, AIn) -> [E | AIn] end, []),
  