In my attempt to understand Optimistic locking in Java 8,I came across the below piece of code. Original Blog Here.
As explained in the blog, this piece of code is at