public ClientSession toClientSession()
    {
        return new ClientSession(
                parseServer(server),
                user,
                source,
                Optional.empty(),
                parseClientTags(clientTags),
                clientInfo,
                catalog,
                schema,
                TimeZone.getDefault().getID(),
                Locale.getDefault(),
                toResourceEstimates(resourceEstimates),
                toProperties(sessionProperties),
                emptyMap(),
                emptyMap(),
                toExtraCredentials(extraCredentials),
                null,
                clientRequestTimeout,
                disableCompression,
                emptyMap(),
                emptyMap(),
                validateNextUriSource);
    }
@Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = "Multiple entries with same key: test.token.foo=bar and test.token.foo=foo")
    public void testDuplicateExtraCredentialKey()
    {
        Console console = singleCommand(Console.class).parse("--extra-credential", "test.token.foo=foo", "--extra-credential", "test.token.foo=bar");
        ClientOptions options = console.clientOptions;
        options.toClientSession();
    }