@Test
public void fromJson() {

    final String defaultSubjectId = "google:i-am-user";
    final String otherSubjectId = "eclipse:i-am-not-google";
    final JsonObject json = JsonFactory.newObjectBuilder()
            .set("defaultSubject", defaultSubjectId)
            .set("subjects", JsonArray.of(defaultSubjectId, otherSubjectId))
            .build();
    final DefaultUserInformation userInformation = DefaultUserInformation.fromJson(json);
    assertThat(userInformation.getDefaultSubject()).contains(defaultSubjectId);
    assertThat(userInformation.getSubjects()).containsExactly(defaultSubjectId, otherSubjectId);
}