Move getClassFromFile from `PackageManager` to `Helpers` && added tests.