added tests for package factory