Add tests for closing the billing cycle.
Integrate with advancedqueue retrying.