Refactor unit tests. Add tests for list packages.