anchor.diff:  |===
   |Plan Name   |Product|Plan Description
   //----------------------
  -|standard-monthly   |Standard   |`TRIAL` phase of 30 days followed by an `EVERGREEN` phase with a monthly recurring charge of `$100`   
  +|standard-monthly   |Standard   |`TRIAL` phase of `30` days followed by an `EVERGREEN` phase with a monthly recurring charge of `$100`   
   |sports-monthly   |Sports   |Single `EVERGREEN` phase with a monthly recurring charge of `$500`
   |super-monthly   |Super   |Single `EVERGREEN` phase with a monthly recurring charge of `$1000`
   |premium-monthly   |Premium   |Single `EVERGREEN` phase with a monthly recurring charge of `$2000`
  
positive.code: |===
  |Action   |Result   
  //-------------
  |Create a subscription for the `standard-monthly` plan on `2021-09-29` (current date)  |Invoice generated for `$25` for `2021-09-29` to `2021-10-29` corresponding to  `standard-monthly` plan
  |Cancel subscription (Default Policy)| Since `BASE` product category uses `END_OF_TERM` cancellation policy, no credit is generated. So, there is no invoice item corresponding to a credit.
  
  ==== Rule 2: If `productCategory=ADD_ON`, cancellation policy=`IMMEDIATE`
  
  |Create a subscription for the `standard-monthly` plan on `2021-09-29` (current date)  |Invoice generated for `$25` for `2021-09-29` to `2021-10-29` corresponding to  `standard-monthly` plan
  |Add the `remotecontrol-monthly` add-on to the existing subscription on `2021-09-29` (current date) | Invoice generated for `$15` for `2021-09-29` to `2021-10-29` corresponding to  `remotecontrol-monthly` plan 
  |Cancel addon subscription (Default Policy)| Since `ADDON` product category uses `IMMEDIATE` cancellation policy, an invoice item is created with a credit of `$15`
  |Cancel base subscription (Default Policy)| Since `BASE` product category uses `END_OF_TERM` cancellation policy, credit is generated.
  |===
  
  TODO: add about default rule?
  
  === Plan Change Timing
  
  This rule specifies how the system should behave when a plan corresponding to a subscription is changed as explained in the https://docs.killbill.io/latest/userguide_subscription.html#$$_$$plan_change_timing[_Subscription Billing_] document.
  
  A quick summary of plan cancellation rules:
  
  * A rule specifies one of either phaseType or  fromProduct/toProduct or fromProductCategory/toProductCategory or fromBillingPeriod/toBillingPeriod or fromPriceList/toPriceList and its change policy.
  
  * There are three possible values for change policy, `END_OF_TERM`,  `IMMEDIATE` and `ILLEGAL`.
  
  * END_OF_TERM - specifies that the change should happen at the end of the current billing period.
  
  * IMMEDIATE - specifies that the change should happen immediately.
  
  * ILLEGAL - specifies that the plan change is not allowed.
  
  This example uses the  https://github.com/killbill/killbill-docs/blob/1a945188c0ef53a3c7f797b4890514d35c09c46f/catalogs/subscription-alignment-plan-change-timing.xml[Subscription Alignment Plan Change Timing] catalog. 
  
  
negative.code: |Trigger invoice dry run with target date `2021-10-20`   |Invoice generated for `$42.90` for `2021-10-20` to `2021-11-20` corresponding to both plans
  |===
  
  == Subscription Alignment Rules
  
  The https://docs.killbill.io/latest/userguide_subscription.html#$$_$$subscription_alignment_rules[_Subscription Alignment Rules_] section in the catalog can be used to specify rules that are useful for advanced use cases. This section explains some of these rules. 
  
  === Plan Creation Addon Phase Alignment
  
  The https://docs.killbill.io/latest/userguide_subscription.html#$$_$$subscription_alignment_rules[plan creation addon phase alignment] rules specify how the phases of an addon subscription _align_ with the phases of the base subscription. 
  
  A quick summary of plan creation phase alignment rules:
  
  * A rule specifies the name of an addon product and how its phases should align with the phases of the base product.
  * There are two possible values for phase alignment, `START_OF_BUNDLE` and `START_OF_SUBSCRIPTION`.
  
  * `START_OF_BUNDLE` causes the phases of the add-on subscription to align with the phases of the base subscription. 
  
  * `START_OF_SUBSCRIPTION` causes the phases of the add-on subscription to start with the add-on subscription irrespective of the base subscription.
  
  This example uses the  https://github.com/killbill/killbill-docs/tree/4671dcd9da1cf021e85629ab67e3ffb6fb553bb1/catalogs/subscription-alignment-plan-creation-addon-phase-alignment.xml[Subscription Alignment Plan Creation Addon Phase] catalog. 
  
  