Added JPA test

Added JPA test for the new 2.1 feature of dynamically adding named queries. This particularly tests dynamically adding Criteria queries