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1hcCA9IG5ldyBIYXNoTWFwPFN0cmluZywgU3RyaW5nPigpOwotICAgICAgICBDb21wYXJlTm9kZSBjbXAgID0gbmV3IENvbXBhcmVOb2RlKCk7Ci0gICAgICAgIHRyeQotICAgICAgICB7Ci0gICAgICAgICAgICBTdHJpbmcgcz0iPGNvbmZpZ3VyYXRpb24gIHhtbG5zPSIKLSAgICAgICAgICAgICAgICAgICAgKyAiXCJodHRwOi8veG1sLmp1bmlwZXIubmV0L3hubS8xLjEveG5tXCIiCi0gICAgICAgICAgICAgICAgICAgICsgIiBqdW5vczpjb21taXQtc2Vjb25kcz0iCi0gICAgICAgICAgICAgICAgICAgICsiXCIxNDczOTU3NTM2XCIgIgotICAgICAgICAgICAgICAgICAgICArImp1bm9zOmNvbW1pdC1sb2NhbHRpbWU9IgotICAgICAgICAgICAgICAgICAgICArIlwiMjAxNi0wOS0xNSAxNjozODo1NiBVVENcIiAiCi0gICAgICAgICAgICAgICAgICAgICsgImp1bm9zOmNvbW1pdC11c2VyPSIKLSAgICAgICAgICAgICAgICAgICAgKyJcInJvb3RcIiIKLSAgICAgICAgICAgICAgICAgICAgKyI+PG5hbWU+VGVzdDwvbmFtZT48L2NvbmZpZ3VyYXRpb24+IjsKKyAgICAgICAgQ29tcGFyZU5vZGUgY21wID0gbmV3IENvbXBhcmVOb2RlKCk7CisgICAgICAgIFN0cmluZyBzID0gIjxjb25maWd1cmF0aW9uICB4bWxucz0iICsgIlwiaHR0cDovL3htbC5qdW5pcGVyLm5ldC94bm0vMS4xL3hubVwiIiArICIganVub3M6Y29tbWl0LXNlY29uZHM9IgorICAgICAgICAgICAgICAgICsgIlwiMTQ3Mzk1NzUzNlwiICIgKyAianVub3M6Y29tbWl0LWxvY2FsdGltZT0iICsgIlwiMjAxNi0wOS0xNSAxNjozODo1NiBVVENcIiAiICsgImp1bm9zOmNvbW1pdC11c2VyPSIKKyAgICAgICAgICAgICAgICArICJcInJvb3RcIiIgKyAiPjxuYW1lPlRlc3Q8L25hbWU+PC9jb25maWd1cmF0aW9uPiI7CiAKLSAgICAgICAgICAgIFN0cmluZyB0ID0iPGNvbmZpZ3VyYXRpb24gIHhtbG5zPSIKLSAgICAgICAgICAgICAgICAgICAgKyAiXCJodHRwOi8veG1sLmp1bmlwZXIubmV0L3hubS8xLjEveG5tXCIiCi0gICAgICAgICAgICAgICAgICAgICsgIiBqdW5vczpjb21taXQtc2Vjb25kcz0iCi0gICAgICAgICAgICAgICAgICAgICsiXCIxNDczOTU3NTM2XCIgIgotICAgICAgICAgICAgICAgICAgICArImp1bm9zOmNvbW1pdC1sb2NhbHRpbWU9IgotICAgICAgICAgICAgICAgICAgICArIlwiMjAxNi0wOS0xNSAxNjozODo1NiBVVENcIiAiCi0gICAgICAgICAgICAgICAgICAgICsgImp1bm9zOmNvbW1pdC11c2VyPSIKLSAgICAgICAgICAgICAgICAgICAgKyJcInJvb3RcIiIKLSAgICAgICAgICAgICAgICAgICAgKyI+PG5hbWU+VGVzdDwvbmFtZT48L2NvbmZpZ3VyYXRpb24+IjsKLQotICAgICAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKCJzPSIgKyBzKTsKLQotICAgICAgICAgICAgdGVzdE1hcC5wdXQoImNvbXBhcmVEYXRhVHlwZSIsICJSRVNUQ09ORi1YTUwiKTsKLSAgICAgICAgICAgIHRlc3RNYXAucHV0KCJyZXF1ZXN0SWRlbnRpZmllciIsICIxMjMiKTsKLSAgICAgICAgICAgIHRlc3RNYXAucHV0KCJzb3VyY2VEYXRhIiwgcyk7Ci0gICAgICAgICAgICB0ZXN0TWFwLnB1dCgidGFyZ2V0RGF0YSIsIHQpOwotICAgICAgICAgICAgY21wLmNvbXBhcmUodGVzdE1hcCwgY3R4KTsKLSAgICAgICAgICAgIGFzc2VydChjdHguZ2V0QXR0cmlidXRlKCIxMjMuIiArICJTVEFUVVMiKS5lcXVhbHMoIlNVQ0NFU1MiKSk7Ci0gICAgICAgIH0KLSAgICAgICAgY2F0Y2ggKFN2Y0xvZ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BDCisgKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorICogQ29weXJpZ2h0IChDKSAyMDE3IEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5LiBBbGwgcmlnaHRzIHJlc2VydmVkLgorICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKyAqIENvcHlyaWdodCAoQykgMjAxNyBBbWRvY3MKKyAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisgKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsKKyAqIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4KKyAqIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdAorICogCisgKiAgICAgIGh0dHA6Ly93d3cuYXBhY2hlLm9yZy9saWNlbnNlcy9MSUNFTlNFLTIuMAorICogCisgKiBVbmxlc3MgcmVxdWlyZWQgYnkgYXBwbGljYWJsZSBsYXcgb3IgYWdyZWVkIHRvIGluIHdyaXRpbmcsIHNvZnR3YXJlCisgKiBkaXN0cmlidXRlZCB1bmRlciB0aGUgTGljZW5zZSBpcyBkaXN0cmlidXRlZCBvbiBhbiAiQVMgSVMiIEJBU0lTLAorICogV0lUSE9VVCBXQVJSQU5USUVTIE9SIENPTkRJVElPTlMgT0YgQU5ZIEtJTkQsIGVpdGhlciBleHByZXNzIG9yIGltcGxpZWQuCisgKiBTZWUgdGhlIExpY2Vuc2UgZm9yIHRoZSBzcGVjaWZpYyBsYW5ndWFnZS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AuLjg1MjMwZjQKLS0tIC9kZXYvbnVsbAorKysgYi9hcHBjLWNvbmZpZy9hcHBjLWNvbmZpZy1nZW5lcmF0b3IvcHJvdmlkZXIvc3JjL3Rlc3QvamF2YS9vcmcvb3BlbmVjb21wL3NkbmMvY29uZmlnL2dlbmVyYXRvci90b29sL1Rlc3REYXRhVG9vbC5qYXZhCkBAIC0wLDAgKzEsMTUzIEBACisvKi0KKyAqID09PT09PT09PT09PUxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisgKiBPTkFQIDogQVBQQworICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKyAqIENvcHlyaWdodCAoQykgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4KKyAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisgKiBDb3B5cmlnaHQgKEMpIDIwMTcgQW1kb2NzCisgKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorICogTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlICJMaWNlbnNlIik7CisgKiB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuCisgKiBZb3UgbWF5IG9idGFpbiBhIGNvcHkgb2YgdGhlIExpY2Vuc2UgYXQKKyAqIAorICogICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjAKKyAqIAorICogVW5sZ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ciB0aGUgTGljZW5zZS4KLSAgPT09PT09PT09PT09TElDRU5TRV9FTkQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgLS0+CisvKi0KKyAqID09PT09PT09PT09PUxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisgKiBPTkFQIDogQVBQLUMKKyAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisgKiBDb3B5cmlnaHQgKEMpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuICBBbGwgcmlnaHRzIHJlc2VydmVkLgorICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKyAqIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAgKHRoZSAiTGljZW5zZSIpOworICogeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLgorICogWW91IG1heSBvYnRhaW4gYSBjb3B5IG9mIHRoZSBMaWNlbnNlIGF0CisgKgorICogICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjAKKyAqCisgKiBVbmxlc3MgcmVxdWlyZWQgYnkgYXBwbGljYWJsZSBsYXcgb3IgYWdyZWVkIHRvIGluIHdyaXRpbmcsIHNvZnR3YXJlCisgKiBkaXN0cmlidXRlZCB1bmRlciB0aGUgTGljZW5zZSBpcyBkaXN0cmlidXRlZCBvbiBhbiAiQVMgSVMiIEJBU0lTLAorICogV0lUSE9VVCBXQVJSQU5USUVTIE9SIENPTkRJVElPTlMgT0Yg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