proxy.execute();
assertResultOK(proxy);
// Check JSON
ObjectNode obj = getJSON(proxy);
assertThat(obj.get("id").asText(), is(TestDataProvider.DEFAULT_USER_ID));
// TODO: Checks Twitter?
// Checks UserPreference.
JsonNode prefObj = obj.get("preference");
UserPreference pref = UserPreference.getDefaultPreference(TestDataProvider.DEFAULT_USER_ID);
Assert.assertEquals(pref.isProfilePublic(), prefObj.get("profilePublic").asBoolean());
Assert.assertEquals(pref.isReceivingTwitterMessage(), prefObj.get("receivingTwitterMessage").asBoolean());
Assert.assertEquals(pref.tweetsAttendanceAutomatically(), prefObj.get("tweetingAttendanceAutomatically").asBoolean());
// Checks OpenIds
JsonNode array = obj.get("openIds");
List<String> openIds = new ArrayList<String>();
for (int i = 0; i < array.size(); ++i)
openIds.add(array.get(i).get("identifier").asText());
assertThat(openIds, hasItem(TestDataProvider.DEFAULT_USER_OPENID_IDENTIFIER));