ActionProxy proxy = getActionProxy(GET, "/api/user/get?userId=" + DEFAULT_USER_ID);
proxy.execute();
assertResultOK(proxy);
ObjectNode obj = getJSON(proxy);
assertThat(obj.get("id").asText(), is(DEFAULT_USER_ID));
// These values should not be public.
assertThat(obj.get("twitterId"), is(nullValue()));
assertThat(obj.get("lastLoginAt"), is(nullValue()));
assertThat(obj.get("calendarId"), is(nullValue()));
JsonNode twitter = obj.get("twitter");
assertThat(twitter, is(notNullValue()));
assertThat(twitter.get("screenName").asText(), is(DEFAULT_TWITTER_SCREENNAME));
assertThat(twitter.get("profileImageURL").asText(), is("http://www.example.com/"));
// These values should not be public.
assertThat(twitter.get("accessToken"), is(nullValue()));
assertThat(twitter.get("accessTokenSecret"), is(nullValue()));
// We don't expose OpenID Linkage.
assertThat(obj.get("openIDLinakge"), is(nullValue()));
}