Refined JPA support and testing a bit