test_class.file: services/gateway/endpoints/src/test/java/org/eclipse/ditto/services/gateway/endpoints/routes/whoami/DefaultUserInformationTest.java
test_class.identifier: DefaultUserInformationTest
test_case.body: @Test
      public void fromJsonThrowsOnMissingSubjects() {
          final JsonObject json = JsonFactory.newObjectBuilder()
                  .set("defaultSubject", (String) null)
                  .build();
  
          assertThatExceptionOfType(JsonMissingFieldException.class)
                  .isThrownBy(() -> DefaultUserInformation.fromJson(json));
      }
test_case.class_method_signature: DefaultUserInformationTest.fromJsonThrowsOnMissingSubjects()
test_case.full_signature: @Test public void fromJsonThrowsOnMissingSubjects()
test_case.identifier: fromJsonThrowsOnMissingSubjects
test_case.invocations: build set newObjectBuilder isThrownBy assertThatExceptionOfType fromJson
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void fromJsonThrowsOnMissingSubjects()
focal_class.declarator: defaultSubject
focal_class.modifier: @Nullable
      private final
focal_class.original_string: @Nullable
      private final String defaultSubject;
focal_class.type: String
focal_class.var_name: defaultSubject
focal_class.declarator: subjects
focal_class.modifier: private final
focal_class.original_string: private final List<String> subjects;
focal_class.type: List<String>
focal_class.var_name: subjects
focal_class.file: services/gateway/endpoints/src/main/java/org/eclipse/ditto/services/gateway/endpoints/routes/whoami/DefaultUserInformation.java
focal_class.identifier: DefaultUserInformation
focal_class.interfaces: implements UserInformation
focal_class.class_method_signature: DefaultUserInformation.DefaultUserInformation(@Nullable final String defaultSubject,
              final List<String> subjects)
focal_class.full_signature: private  DefaultUserInformation(@Nullable final String defaultSubject,
              final List<String> subjects)
focal_class.identifier: DefaultUserInformation
focal_class.modifiers: private
focal_class.parameters: (@Nullable final String defaultSubject,
              final List<String> subjects)
focal_class.signature:  DefaultUserInformation(@Nullable final String defaultSubject,
              final List<String> subjects)
focal_class.class_method_signature: DefaultUserInformation.fromAuthorizationContext(final AuthorizationContext context)
focal_class.full_signature: public static DefaultUserInformation fromAuthorizationContext(final AuthorizationContext context)
focal_class.identifier: fromAuthorizationContext
focal_class.modifiers: public static
focal_class.parameters: (final AuthorizationContext context)
focal_class.return: DefaultUserInformation
focal_class.signature: DefaultUserInformation fromAuthorizationContext(final AuthorizationContext context)
focal_class.class_method_signature: DefaultUserInformation.fromJson(final JsonObject jsonObject)
focal_class.full_signature: public static DefaultUserInformation fromJson(final JsonObject jsonObject)
focal_class.identifier: fromJson
focal_class.modifiers: public static
focal_class.parameters: (final JsonObject jsonObject)
focal_class.return: DefaultUserInformation
focal_class.signature: DefaultUserInformation fromJson(final JsonObject jsonObject)
focal_class.class_method_signature: DefaultUserInformation.getDefaultSubject()
focal_class.full_signature: @Override public Optional<String> getDefaultSubject()
focal_class.identifier: getDefaultSubject
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Optional<String>
focal_class.signature: Optional<String> getDefaultSubject()
focal_class.class_method_signature: DefaultUserInformation.getSubjects()
focal_class.full_signature: @Override public List<String> getSubjects()
focal_class.identifier: getSubjects
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: List<String>
focal_class.signature: List<String> getSubjects()
focal_class.class_method_signature: DefaultUserInformation.toJson(final JsonSchemaVersion schemaVersion, final Predicate<JsonField> predicate)
focal_class.full_signature: @Override public JsonObject toJson(final JsonSchemaVersion schemaVersion, final Predicate<JsonField> predicate)
focal_class.identifier: toJson
focal_class.modifiers: @Override public
focal_class.parameters: (final JsonSchemaVersion schemaVersion, final Predicate<JsonField> predicate)
focal_class.return: JsonObject
focal_class.signature: JsonObject toJson(final JsonSchemaVersion schemaVersion, final Predicate<JsonField> predicate)
focal_class.class_method_signature: DefaultUserInformation.equals(@Nullable final Object o)
focal_class.full_signature: @Override public boolean equals(@Nullable final Object o)
focal_class.identifier: equals
focal_class.modifiers: @Override public
focal_class.parameters: (@Nullable final Object o)
focal_class.return: boolean
focal_class.signature: boolean equals(@Nullable final Object o)
focal_class.class_method_signature: DefaultUserInformation.hashCode()
focal_class.full_signature: @Override public int hashCode()
focal_class.identifier: hashCode
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int hashCode()
focal_class.class_method_signature: DefaultUserInformation.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_method.body: 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);
      }
focal_method.class_method_signature: DefaultUserInformation.fromJson(final JsonObject jsonObject)
focal_method.full_signature: public static DefaultUserInformation fromJson(final JsonObject jsonObject)
focal_method.identifier: fromJson
focal_method.invocations: checkNotNull orElse getValue collect map filter stream getValueOrThrow toList
focal_method.modifiers: public static
focal_method.parameters: (final JsonObject jsonObject)
focal_method.return: DefaultUserInformation
focal_method.signature: DefaultUserInformation fromJson(final JsonObject jsonObject)