Fix imports
Adjust code to the imports and make the test code working

At the bottom the test code is now working assuming you have the rights
to access the admin panel in pkgdb2