public void RequestUriNamedKeyTest()
        {
            CombinatorialEngine engine = CombinatorialEngine.FromDimensions(
                new Dimension("TypeData", TypeData.Values),
                new Dimension("UseSmallCasing", new bool[] { true, false }),
                new Dimension("UseDoublePostfix", new bool[] { true, false }));

            bool syntaxErrorTested = false;
            TestUtil.RunCombinatorialEngineFail(engine, delegate(Hashtable values)
            {
                TypeData typeData = (TypeData)values["TypeData"];
                if (!typeData.IsTypeSupportedAsKey)
                {
                    return;
                }

                // TODO: when System.Uri handles '/' correctly, re-enable.
                if (typeData.ClrType == typeof(System.Xml.Linq.XElement))
                {
                    return;
                }

                Type entityType = typeof(DoubleKeyTypedEntity<,,>).MakeGenericType(typeData.ClrType, typeData.ClrType, typeof(int));
                CustomDataContextSetup setup = new CustomDataContextSetup(entityType);
                object idValue = typeData.NonNullValue;
                if (idValue is byte[])
                {
                    // idValue = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 };
                    return;
                }

                bool useSmallCasing = (bool)values["UseSmallCasing"];
                bool useDoublePostFix = (bool)values["UseDoublePostfix"];

                if (!(idValue is double) && useDoublePostFix)
                {
                    return;
                }

                string valueAsString = TypeData.FormatForKey(idValue, useSmallCasing, useDoublePostFix);

                TestUtil.ClearMetadataCache();
                using (TestWebRequest request = TestWebRequest.CreateForLocation(WebServerLocation.InProcess))
                {
                    Trace.WriteLine("Running with value: [" + valueAsString + "] for [" + typeData.ToString() + "]");
                    setup.Id = idValue;
                    setup.SecondId = idValue;
                    setup.MemberValue = 1;

                    request.DataServiceType = setup.DataServiceType;
                    request.Accept = "application/atom+xml,application/xml";
                    request.RequestUriString = "/Values(FirstKey=" + valueAsString + ",SecondKey=" + valueAsString + ")";
                    request.SendRequest();
                    string response = request.GetResponseStreamAsText();
                    TestUtil.AssertContains(response, "/Values(FirstKey=");
                    TestUtil.AssertContains(response, ",SecondKey=");
                    if (!syntaxErrorTested)
                    {
                        syntaxErrorTested = true;
                        VerifyRequestSyntaxError(request,
                            "/Values(" + valueAsString + "," + valueAsString + ")");
                        VerifyRequestSyntaxError(request,
                            "/Values(SecondKey == " + valueAsString + " , FirstKey = " + valueAsString + " )");
                        VerifyRequestSyntaxError(request,
                            "/Values(ASecondKey = " + valueAsString + " , FirstKey = " + valueAsString + " )");
                        VerifyRequestSyntaxError(request,
                            "/Values(SecondKey = " + valueAsString + ")");
                        VerifyRequestSyntaxError(request,
                            "/Values(SecondKey = " + valueAsString + ",,FirstKey=" + valueAsString + ")");
                        VerifyRequestSyntaxError(request,
                            "/Values(SecondKey)");
                        VerifyRequestSyntaxError(request,
                            "/Values(SecondKey=,FirstKey=)");
                        VerifyRequestSyntaxError(request,
                            "/Values(SecondKey = " + valueAsString + ",FirstKey=" + valueAsString +
                            ",ThirdKey=" + valueAsString + ")");
                    }
                }
                setup.Cleanup();
            });
        }