anchor.diff:  ----
   
   
  -You can then refer to the  https://github.com/killbill/killbill-payment-test-plugin/blob/master/README.md[plugin documentation (section Global State Configuration)] to configure the plugin and trigger failures. 
  -
  -At this point, one can create an account and set a payment method to use the `payment test plugin`:
  +At this point, one can create an account and set a payment method to use the `payment test plugin`. The scenario below will do the following:
  +
  +* Create account
  +* Add default payment matching our test payment plugin
  +* Create a subscription
  +* Move the clock after the trial and observe first successfull payments
  +* Configure payment plugin to fail payments
  +* Move the clock a month later and observe first failed payment
  +* Move clock +1 day and observe first payment retry
  +* Move clock +1 day and observe second payment retry
  +* Move clock +8 day and observe third payment retry and first overdue state `WARNING`
  +* Move clock +4 day and observe second overdue state `BLOCKED`
  +* Move clock +7 day and observe second overdue state `CANCELLATION` and verify subscription has been automatically cancelled by the system
   
   [start = 1]
   1. Create your account:
  
positive.code: -H "Content-Type: application/json" \
  -H "X-Killbill-CreatedBy: demo" \
  -X POST \
  --data-binary '{"accountId":"60035793-cbe5-472a-8bd8-3c67cc3beaf4","externalKey":"arthur9","productName":"Standard","productCategory":"BASE","billingPeriod":"MONTHLY","priceList":"DEFAULT"}' \
  "http://127.0.0.1:8080/1.0/kb/subscriptions?requestedDate=2015-09-01"
  ----
   
  
  
  [[platform_use]]
  
negative.code: "http://127.0.0.1:8080/1.0/kb/accounts/60035793-cbe5-472a-8bd8-3c67cc3beaf4/paymentMethods?isDefault=true"
  ----
  
  
  [start = 3]
  3. Create a subscription to trigger some invoices and (failed) payment. 
  
  Note: The current date in the system is set to `2015-12-30` (date at which this experiment was conducted). You will need to either set the system time (suing endpoint shown below) to that date or translate to the dates of your choice.
  
  [source,bash]
  ----
  