jpa test with constraints