Added ability to list PackageTypes.
Tidy test to remove duplication and improve reuse.