I assume that if the global method does not do a callout then it would function the same under test as in live code. When you return mock data that is unrelated to the parameters sent and is not documented then it is hard for us to code against and acheive our test coverage. I understand you need to have data for your test coverage when run in your org. The trick listed here possible way to detect packaging org looks interesting to use if your code is running in your org unmanaged or in ours as managed. I have not worked on packaged code so I do not know if this is viable.
... View more
This attribute defines the lifecycle of a Quote Charge. We have quite a few documents about the usage of this attribute.
Here are the docs:
Global method definition (also pointed out by Daniel - this is the definition of the global attribute groupType). The range of values are marked with "Life cycle indicator."
https://knowledgecenter.zuora. com/CA_Commerce/F_Development_ Resources/C_Component_Library/ C_Global_Classes/B_ zChargeGroup_Class
This is a more use-case driven doc about how to use zChargeGroup to add/update/delete products. It outlines how the groupType attribute value is being populated:
https://knowledgecenter.zuora. com/CA_Commerce/F_Development_ Resources/C_Component_Library/ G_Component_Library_Sample_ Code/B_Managing_Charges_with_ the_Product_Catalog/B_Use_the_ Product_Catalog_to_Add%2C_ Update%2C_and_Delete_Charges
This document was added with Quotes version 5.100 and earlier. It is no longer applicable to new Quotes app since 5.100, but the diagrams in this doc capture the lifecycle of products in a quote the best. I think this doc can be modified and merged into the new Component Library docs.
https://knowledgecenter.zuora. com/CA_Commerce/F_Development_ Resources/C_Component_Library/ G_Component_Library_Sample_ Code/B_Managing_Charges_with_ the_Product_Catalog
... View more