Java Database migration and database test