How do I examine an entity's update SQL statement in order to write a unit test?
Just write a test that attempts to update a primary key, and assert that it fails to do so.

There's no need to test the SQL generation mechanism of the storage class.