Fixing JPA ids + more tests