add tests for refund and referenced purchase