Ensure JpaUserDetailsTests closes embedded DB

Fixes gh-1712