some small refactor for tests on Packages method