anchor.diff:      NewEntry1 = ?TEST_DB:get_entry(DB4, db_entry:get_key(Entry1)),
       NewEntry2 = ?TEST_DB:get_entry(DB4, db_entry:get_key(Entry2)),
       check_changes(DB4, ChangesInterval, "update_entries_1"),
  -    check_entry_in_changes(DB4, ChangesInterval, NewEntry1, Old1, "update_entries_2"),
  -    check_entry_in_changes(DB4, ChangesInterval, NewEntry2, Old2, "update_entries_3"),
  +    ?implies(db_entry:get_version(element(2, Old1)) < db_entry:get_version(Entry1),
  +             check_entry_in_changes(DB4, ChangesInterval, NewEntry1, Old1, "update_entries_2")),
  +    ?implies(db_entry:get_version(element(2, Old2)) < db_entry:get_version(Entry2),
  +             check_entry_in_changes(DB4, ChangesInterval, NewEntry2, Old2, "update_entries_3")),
       
       DB5 = check_stop_record_changes(DB4, ChangesInterval, "update_entries_4"),
   
  
positive.code:             case length([K || K <- DeletedKeys, K =:= Key]) of
                  1 -> ok;
                  _ -> ?ct_fail("element(2, ?TEST_DB:get_changes(DB)) evaluated "
                                "to \"~w\" and did not contain 1x key ~w~n(~s)~n",
                                [DeletedKeys, Key, lists:flatten(Note)])
              end;
          _    -> true
  
negative.code:         true ->
              case length([E || E <- ChangedEntries, E =:= NewEntry]) of
                  1 -> ok;
                  _ -> ?ct_fail("element(1, ?TEST_DB:get_changes(DB)) evaluated "
                                "to \"~w\" and did not contain 1x changed entry ~w~n(~s)~n",
                                [ChangedEntries, NewEntry, lists:flatten(Note)])
              end;
          _    -> ok
      end.
  