oapmc generate pkg + refactoring tests