public static String keyToString(Object key,
                                   URLEscaper.Escaping escaping,
                                   UriComponent.Type componentType,
                                   boolean full,
                                   ProtocolVersion version)
  {
    if (version.compareTo(AllProtocolVersions.RESTLI_PROTOCOL_2_0_0.getProtocolVersion()) >= 0)
    {
      return keyToStringV2(key, escaping, componentType, full);
    }
    else
    {
      return keyToStringV1(key, escaping, full);
    }
  }
@Test(dataProvider = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "compoundKey")
  public void testCompoundKeyToString(ProtocolVersion version, String expected)
  {
    CompoundKey compoundKey = new CompoundKey();
    compoundKey.append("key1", "stringVal");
    compoundKey.append("key2", 5);
    compoundKey.append("key3", TestEnum.VALUE_1);
    String compoundKeyString = URIParamUtils.keyToString(compoundKey, NO_ESCAPING, null, true, version);
    Assert.assertEquals(compoundKeyString, expected);
  }