@Override
    public Identity getIdentity()
    {
        return identity;
    }
@Test
    public void testExtraCredentials()
    {
        HttpServletRequest request = new MockHttpServletRequest(
                ImmutableListMultimap.<String, String>builder()
                        .put(PRESTO_USER, "testUser")
                        .put(PRESTO_SOURCE, "testSource")
                        .put(PRESTO_CATALOG, "testCatalog")
                        .put(PRESTO_SCHEMA, "testSchema")
                        .put(PRESTO_LANGUAGE, "zh-TW")
                        .put(PRESTO_TIME_ZONE, "Asia/Taipei")
                        .put(PRESTO_CLIENT_INFO, "client-info")
                        .put(PRESTO_SESSION, QUERY_MAX_MEMORY + "=1GB")
                        .put(PRESTO_SESSION, JOIN_DISTRIBUTION_TYPE + "=partitioned," + HASH_PARTITION_COUNT + " = 43")
                        .put(PRESTO_PREPARED_STATEMENT, "query1=select * from foo,query2=select * from bar")
                        .put(PRESTO_ROLE, "foo_connector=ALL")
                        .put(PRESTO_ROLE, "bar_connector=NONE")
                        .put(PRESTO_ROLE, "foobar_connector=ROLE{role}")
                        .put(PRESTO_EXTRA_CREDENTIAL, "test.token.key1=" + urlEncode("bar=ab===,d"))
                        .put(PRESTO_EXTRA_CREDENTIAL, "test.token.key2=bar=ab===")
                        .put(PRESTO_EXTRA_CREDENTIAL, "test.json=" + urlEncode("{\"a\" : \"b\", \"c\" : \"d=\"}") + ", test.token.key3 = abc=cd")
                        .put(PRESTO_EXTRA_CREDENTIAL, "test.token.abc=xyz")
                        .build(),
                "testRemote",
                ImmutableMap.of());

        HttpRequestSessionContext context = new HttpRequestSessionContext(request, new SqlParserOptions());
        assertEquals(
                context.getIdentity().getExtraCredentials(),
                ImmutableMap.builder()
                        .put("test.token.key1", "bar=ab===,d")
                        .put("test.token.key2", "bar=ab===")
                        .put("test.token.key3", "abc=cd")
                        .put("test.json", "{\"a\" : \"b\", \"c\" : \"d=\"}")
                        .put("test.token.abc", "xyz")
                        .build());
    }