refactored test code packaging to match production