Do you use H2 as embedded database for tests ? I stumbled across the same problem, whereas if using an actual database (eg. Postgresql a proper UUID is returned) everything worked fine.
The issue on H2 target a discussion on Hibernate bug tracker, but the solution is somewhat unclear.