def METHOD_NAME(
    mocked_gateway, charged_payment, razorpay_success_response, gateway_config
):
    # Mock the gateway response to a success response
    mocked_gateway.return_value.payment.refund.return_value = razorpay_success_response
    payment_info = create_payment_information(
        charged_payment, amount=TRANSACTION_AMOUNT
    )
    # Attempt charging
    response = refund(payment_info, gateway_config)
    # Ensure the was no error returned
    assert not response.error
    assert response.is_success
    assert response.kind == TransactionKind.REFUND
    assert response.amount == TRANSACTION_AMOUNT
    assert response.currency == razorpay_success_response["currency"]
    assert response.raw_response == razorpay_success_response
    assert response.transaction_id == razorpay_success_response["id"]