Code for testing java persistence TTW