@Override
    public TestFunctionResult testFunction(TestFunctionRequest request) {
        request = beforeClientExecution(request);
        return executeTestFunction(request);
    }
<p>
Tests a CloudFront function.
</p>
<p>
To test a function, you provide an <i>event object</i> that represents an HTTP request or response that your
CloudFront distribution could receive in production. CloudFront runs the function, passing it the event object
that you provided, and returns the function's result (the modified event object) in the response. The response
also contains function logs and error messages, if any exist. For more information about testing functions, see
<a
href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/managing-functions.html#test-function"
>Testing functions</a> in the <i>Amazon CloudFront Developer Guide</i>.
</p>
<p>
To test a function, you provide the function's name and version (<code>ETag</code> value) along with the event
object. To get the function's name and version, you can use <code>ListFunctions</code> and
<code>DescribeFunction</code>.
</p>

@param testFunctionRequest
@return Result of the TestFunction operation returned by the service.
@throws InvalidArgumentException
        An argument is invalid.
@throws InvalidIfMatchVersionException
        The <code>If-Match</code> version is missing or not valid.
@throws NoSuchFunctionExistsException
        The function does not exist.
@throws TestFunctionFailedException
        The CloudFront function failed.
@throws UnsupportedOperationException
        This operation is not supported in this region.
@sample AmazonCloudFront.TestFunction
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/TestFunction" target="_top">AWS API
     Documentation</a>
aws-java-sdk-cloudfront/src/main/java/com/amazonaws/services/cloudfront/AmazonCloudFrontClient.java