public void testParse()
throws Exception {
URI regURI = new URI("https://server.example.com/register/s6BhdRkqt3");
HTTPRequest httpRequest = new HTTPRequest(HTTPRequest.Method.PUT, regURI.toURL());
httpRequest.setAuthorization("Bearer reg-23410913-abewfq.123483");
httpRequest.setContentType(CommonContentTypes.APPLICATION_JSON);
String json = "{\"client_id\":\"s6BhdRkqt3\","
+ " \"client_secret\": \"cf136dc3c1fc93f31185e5885805d\","
+ " \"redirect_uris\":[\"https://client.example.org/callback\",\"https://client.example.org/alt\"],"
+ " \"scope\": \"read write dolphin\","
+ " \"grant_types\": [\"authorization_code\", \"refresh_token\"],"
+ " \"token_endpoint_auth_method\": \"client_secret_basic\","
+ " \"jwks_uri\": \"https://client.example.org/my_public_keys.jwks\","
+ " \"client_name\":\"My New Example\","
+ " \"client_name#fr\":\"Mon Nouvel Exemple\","
+ " \"logo_uri\":\"https://client.example.org/newlogo.png\","
+ " \"logo_uri#fr\":\"https://client.example.org/fr/newlogo.png\""
+ " }";
httpRequest.setQuery(json);
ClientUpdateRequest request = ClientUpdateRequest.parse(httpRequest);
assertEquals(regURI, request.getEndpointURI());