class DefaultUserInformation implements UserInformation {

    public static DefaultUserInformation fromJson(final JsonObject jsonObject) {
        checkNotNull(jsonObject, "jsonObject");

        @Nullable final String defaultSubject = jsonObject.getValue(JsonFields.DEFAULT_SUBJECT).orElse(null);
        final List<String> subjects = jsonObject.getValueOrThrow(JsonFields.SUBJECTS)
                .stream()
                .filter(JsonValue::isString)
                .map(JsonValue::asString)
                .collect(Collectors.toList());
        return new DefaultUserInformation(defaultSubject, subjects);
    }

    private  DefaultUserInformation(@Nullable final String defaultSubject,
            final List<String> subjects);

}