test_class.declarator: DEFAULT_SUBJECT = "eclipse:subject"
test_class.modifier: private static final
test_class.original_string: private static final String DEFAULT_SUBJECT = "eclipse:subject";
test_class.type: String
test_class.var_name: DEFAULT_SUBJECT
test_class.declarator: OTHER_SUBJECT = "other:sub"
test_class.modifier: private static final
test_class.original_string: private static final String OTHER_SUBJECT = "other:sub";
test_class.type: String
test_class.var_name: OTHER_SUBJECT
test_class.declarator: AUTHORIZATION_CONTEXT =
              AuthorizationContext.newInstance(DittoAuthorizationContextType.UNSPECIFIED,
                      AuthorizationSubject.newInstance(DEFAULT_SUBJECT),
                      AuthorizationSubject.newInstance(OTHER_SUBJECT))
test_class.modifier: private static final
test_class.original_string: private static final AuthorizationContext AUTHORIZATION_CONTEXT =
              AuthorizationContext.newInstance(DittoAuthorizationContextType.UNSPECIFIED,
                      AuthorizationSubject.newInstance(DEFAULT_SUBJECT),
                      AuthorizationSubject.newInstance(OTHER_SUBJECT));
test_class.type: AuthorizationContext
test_class.var_name: AUTHORIZATION_CONTEXT
test_class.declarator: USER_INFORMATION =
              DefaultUserInformation.fromAuthorizationContext(AUTHORIZATION_CONTEXT)
test_class.modifier: private static final
test_class.original_string: private static final UserInformation USER_INFORMATION =
              DefaultUserInformation.fromAuthorizationContext(AUTHORIZATION_CONTEXT);
test_class.type: UserInformation
test_class.var_name: USER_INFORMATION
test_class.declarator: DITTO_HEADERS = DittoHeaders.newBuilder().correlationId("any").build()
test_class.modifier: private static final
test_class.original_string: private static final DittoHeaders DITTO_HEADERS = DittoHeaders.newBuilder().correlationId("any").build();
test_class.type: DittoHeaders
test_class.var_name: DITTO_HEADERS
test_class.declarator: KNOWN_JSON = JsonFactory.newObjectBuilder()
              .set(CommonCommandResponse.JsonFields.TYPE, WhoamiResponse.TYPE)
              .set(CommonCommandResponse.JsonFields.STATUS, HttpStatusCode.OK.toInt())
              .set("userInformation", USER_INFORMATION.toJson())
              .build()
test_class.modifier: private static final
test_class.original_string: private static final JsonObject KNOWN_JSON = JsonFactory.newObjectBuilder()
              .set(CommonCommandResponse.JsonFields.TYPE, WhoamiResponse.TYPE)
              .set(CommonCommandResponse.JsonFields.STATUS, HttpStatusCode.OK.toInt())
              .set("userInformation", USER_INFORMATION.toJson())
              .build();
test_class.type: JsonObject
test_class.var_name: KNOWN_JSON
test_class.file: services/gateway/endpoints/src/test/java/org/eclipse/ditto/services/gateway/endpoints/routes/whoami/WhoamiResponseTest.java
test_class.identifier: WhoamiResponseTest
test_case.body: @Test
      public void setEntity() {
          final UserInformation otherUserInformation = DefaultUserInformation.fromAuthorizationContext(
                  AuthorizationContext.newInstance(DittoAuthorizationContextType.UNSPECIFIED,
                          AuthorizationSubject.newInstance(OTHER_SUBJECT)));
          final JsonValue expectedEntity = otherUserInformation.toJson();
          final WhoamiResponse originalResponse = WhoamiResponse.of(USER_INFORMATION, DITTO_HEADERS);
  
          final WhoamiResponse responseWithNewEntity = originalResponse.setEntity(expectedEntity);
          final JsonValue newEntity = responseWithNewEntity.getEntity(JsonSchemaVersion.LATEST);
  
          assertThat(newEntity).isEqualTo(expectedEntity);
      }
test_case.class_method_signature: WhoamiResponseTest.setEntity()
test_case.full_signature: @Test public void setEntity()
test_case.identifier: setEntity
test_case.invocations: fromAuthorizationContext newInstance newInstance toJson of setEntity getEntity isEqualTo assertThat
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void setEntity()
focal_class.declarator: TYPE = TYPE_PREFIX + Whoami.NAME
focal_class.modifier: public static final
focal_class.original_string: public static final String TYPE = TYPE_PREFIX + Whoami.NAME;
focal_class.type: String
focal_class.var_name: TYPE
focal_class.declarator: JSON_USER_INFO =
              JsonFactory.newJsonObjectFieldDefinition("userInformation")
focal_class.modifier: private static final
focal_class.original_string: private static final JsonFieldDefinition<JsonObject> JSON_USER_INFO =
              JsonFactory.newJsonObjectFieldDefinition("userInformation");
focal_class.type: JsonFieldDefinition<JsonObject>
focal_class.var_name: JSON_USER_INFO
focal_class.declarator: userInformation
focal_class.modifier: private final
focal_class.original_string: private final JsonObject userInformation;
focal_class.type: JsonObject
focal_class.var_name: userInformation
focal_class.file: services/gateway/endpoints/src/main/java/org/eclipse/ditto/services/gateway/endpoints/routes/whoami/WhoamiResponse.java
focal_class.identifier: WhoamiResponse
focal_class.interfaces: implements WithEntity<WhoamiResponse>
focal_class.class_method_signature: WhoamiResponse.WhoamiResponse(final JsonObject userInformation, final DittoHeaders dittoHeaders)
focal_class.full_signature: private  WhoamiResponse(final JsonObject userInformation, final DittoHeaders dittoHeaders)
focal_class.identifier: WhoamiResponse
focal_class.modifiers: private
focal_class.parameters: (final JsonObject userInformation, final DittoHeaders dittoHeaders)
focal_class.signature:  WhoamiResponse(final JsonObject userInformation, final DittoHeaders dittoHeaders)
focal_class.class_method_signature: WhoamiResponse.of(final UserInformation userInformation, final DittoHeaders dittoHeaders)
focal_class.full_signature: public static WhoamiResponse of(final UserInformation userInformation, final DittoHeaders dittoHeaders)
focal_class.identifier: of
focal_class.modifiers: public static
focal_class.parameters: (final UserInformation userInformation, final DittoHeaders dittoHeaders)
focal_class.return: WhoamiResponse
focal_class.signature: WhoamiResponse of(final UserInformation userInformation, final DittoHeaders dittoHeaders)
focal_class.class_method_signature: WhoamiResponse.fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders)
focal_class.full_signature: public static WhoamiResponse fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders)
focal_class.identifier: fromJson
focal_class.modifiers: public static
focal_class.parameters: (final JsonObject jsonObject, final DittoHeaders dittoHeaders)
focal_class.return: WhoamiResponse
focal_class.signature: WhoamiResponse fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders)
focal_class.class_method_signature: WhoamiResponse.appendPayload(final JsonObjectBuilder jsonObjectBuilder, final JsonSchemaVersion schemaVersion,
              final Predicate<JsonField> predicate)
focal_class.full_signature: @Override protected void appendPayload(final JsonObjectBuilder jsonObjectBuilder, final JsonSchemaVersion schemaVersion,
              final Predicate<JsonField> predicate)
focal_class.identifier: appendPayload
focal_class.modifiers: @Override protected
focal_class.parameters: (final JsonObjectBuilder jsonObjectBuilder, final JsonSchemaVersion schemaVersion,
              final Predicate<JsonField> predicate)
focal_class.return: void
focal_class.signature: void appendPayload(final JsonObjectBuilder jsonObjectBuilder, final JsonSchemaVersion schemaVersion,
              final Predicate<JsonField> predicate)
focal_class.class_method_signature: WhoamiResponse.setDittoHeaders(final DittoHeaders dittoHeaders)
focal_class.full_signature: @Override public WhoamiResponse setDittoHeaders(final DittoHeaders dittoHeaders)
focal_class.identifier: setDittoHeaders
focal_class.modifiers: @Override public
focal_class.parameters: (final DittoHeaders dittoHeaders)
focal_class.return: WhoamiResponse
focal_class.signature: WhoamiResponse setDittoHeaders(final DittoHeaders dittoHeaders)
focal_class.class_method_signature: WhoamiResponse.setEntity(final JsonValue entity)
focal_class.full_signature: @Override public WhoamiResponse setEntity(final JsonValue entity)
focal_class.identifier: setEntity
focal_class.modifiers: @Override public
focal_class.parameters: (final JsonValue entity)
focal_class.return: WhoamiResponse
focal_class.signature: WhoamiResponse setEntity(final JsonValue entity)
focal_class.class_method_signature: WhoamiResponse.getEntity(final JsonSchemaVersion schemaVersion)
focal_class.full_signature: @Override public JsonValue getEntity(final JsonSchemaVersion schemaVersion)
focal_class.identifier: getEntity
focal_class.modifiers: @Override public
focal_class.parameters: (final JsonSchemaVersion schemaVersion)
focal_class.return: JsonValue
focal_class.signature: JsonValue getEntity(final JsonSchemaVersion schemaVersion)
focal_class.class_method_signature: WhoamiResponse.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: WhoamiResponse.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: WhoamiResponse.toString()
focal_class.full_signature: @Override @Nonnull public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override @Nonnull public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.class_method_signature: WhoamiResponse.getSupportedSchemaVersions()
focal_class.full_signature: @Override @Nonnull public JsonSchemaVersion[] getSupportedSchemaVersions()
focal_class.identifier: getSupportedSchemaVersions
focal_class.modifiers: @Override @Nonnull public
focal_class.parameters: ()
focal_class.return: JsonSchemaVersion[]
focal_class.signature: JsonSchemaVersion[] getSupportedSchemaVersions()
focal_class.superclass: extends CommonCommandResponse<WhoamiResponse>
focal_method.body: @Override
      public WhoamiResponse setEntity(final JsonValue entity) {
          checkNotNull(entity, "entity");
          return new WhoamiResponse(entity.asObject(), getDittoHeaders());
      }
focal_method.class_method_signature: WhoamiResponse.setEntity(final JsonValue entity)
focal_method.full_signature: @Override public WhoamiResponse setEntity(final JsonValue entity)
focal_method.identifier: setEntity
focal_method.invocations: checkNotNull asObject getDittoHeaders
focal_method.modifiers: @Override public
focal_method.parameters: (final JsonValue entity)
focal_method.return: WhoamiResponse
focal_method.signature: WhoamiResponse setEntity(final JsonValue entity)