The code works, the ConcurrencyPredicateFactory is not correct I think.
In the DB I have FolderType with ID 16 and Timestamp 0x371B. The query (which does have the predicate produced by the factory, so that works) filters on ID = 16 and 0x371A. So clearly there is something wrong, I'm not sure where...
(edit) AH!
You save instance1 again with instance2, the new timestamp value is in instance2, but not in instance1, which still has the timestamp value of the time THAT one was saved. So that's why the test doesn't work.
I now see I have another error in the UoW: if a save/delete fails, it should throw an ORMConcurrencyException, which is never done. So even though the test wasn't correctly implemented, my code was neither
Fixing round 3!! (this issue only pops up with non-recursive saves in a unitofwork. Recursive saves of course cause this exception already)
(edit2) Oh boy, am I captain obvious! of course that was the intention of the test
...