test_class.declarator: THING_ID = ThingId.of("test.ns", "theThingId")
test_class.modifier: private static final
test_class.original_string: private static final ThingId THING_ID = ThingId.of("test.ns", "theThingId");
test_class.type: ThingId
test_class.var_name: THING_ID
test_class.declarator: FEATURE_ID = "theFeatureId"
test_class.modifier: private static final
test_class.original_string: private static final String FEATURE_ID = "theFeatureId";
test_class.type: String
test_class.var_name: FEATURE_ID
test_class.declarator: SUBJECT = "theSubject"
test_class.modifier: private static final
test_class.original_string: private static final String SUBJECT = "theSubject";
test_class.type: String
test_class.var_name: SUBJECT
test_class.declarator: CONTENT_TYPE = "application/json"
test_class.modifier: private static final
test_class.original_string: private static final String CONTENT_TYPE = "application/json";
test_class.type: String
test_class.var_name: CONTENT_TYPE
test_class.declarator: CORRELATION_ID = UUID.randomUUID().toString()
test_class.modifier: private static final
test_class.original_string: private static final String CORRELATION_ID = UUID.randomUUID().toString();
test_class.type: String
test_class.var_name: CORRELATION_ID
test_class.declarator: DITTO_HEADERS = DittoHeaders.newBuilder().correlationId(CORRELATION_ID).build()
test_class.modifier: private static final
test_class.original_string: private static final DittoHeaders DITTO_HEADERS = DittoHeaders.newBuilder().correlationId(CORRELATION_ID).build();
test_class.type: DittoHeaders
test_class.var_name: DITTO_HEADERS
test_class.declarator: KNOWN_RAW_PAYLOAD_STR = "{\"some\":42}"
test_class.modifier: private static final
test_class.original_string: private static final String KNOWN_RAW_PAYLOAD_STR = "{\"some\":42}";
test_class.type: String
test_class.var_name: KNOWN_RAW_PAYLOAD_STR
test_class.declarator: MESSAGE = MessagesModelFactory.newMessageBuilder(
              MessageHeaders.newBuilder(MessageDirection.TO, THING_ID, SUBJECT)
                      .contentType(CONTENT_TYPE)
                      .featureId(FEATURE_ID)
                      .build())
              .payload(JsonFactory.newObject(KNOWN_RAW_PAYLOAD_STR))
              .build()
test_class.modifier: private static final
test_class.original_string: private static final Message<?> MESSAGE = MessagesModelFactory.newMessageBuilder(
              MessageHeaders.newBuilder(MessageDirection.TO, THING_ID, SUBJECT)
                      .contentType(CONTENT_TYPE)
                      .featureId(FEATURE_ID)
                      .build())
              .payload(JsonFactory.newObject(KNOWN_RAW_PAYLOAD_STR))
              .build();
test_class.type: Message<?>
test_class.var_name: MESSAGE
test_class.declarator: DESERIALIZED_MESSAGE = MessagesModelFactory.newMessageBuilder(
              MessageHeaders.newBuilder(MessageDirection.TO, THING_ID, SUBJECT)
                      .contentType(CONTENT_TYPE)
                      .featureId(FEATURE_ID)
                      .build())
              .payload(JsonFactory.newObject(KNOWN_RAW_PAYLOAD_STR))
              .rawPayload(ByteBuffer.wrap(KNOWN_RAW_PAYLOAD_STR.getBytes()))
              .build()
test_class.modifier: private static final
test_class.original_string: private static final Message<?> DESERIALIZED_MESSAGE = MessagesModelFactory.newMessageBuilder(
              MessageHeaders.newBuilder(MessageDirection.TO, THING_ID, SUBJECT)
                      .contentType(CONTENT_TYPE)
                      .featureId(FEATURE_ID)
                      .build())
              .payload(JsonFactory.newObject(KNOWN_RAW_PAYLOAD_STR))
              .rawPayload(ByteBuffer.wrap(KNOWN_RAW_PAYLOAD_STR.getBytes()))
              .build();
test_class.type: Message<?>
test_class.var_name: DESERIALIZED_MESSAGE
test_class.declarator: KNOWN_MESSAGE_AS_JSON = JsonFactory.newObjectBuilder()
              .set(MessageCommand.JsonFields.JSON_MESSAGE_HEADERS, MESSAGE.getHeaders().toJson())
              .set(MessageCommand.JsonFields.JSON_MESSAGE_PAYLOAD, JsonFactory.newObject(KNOWN_RAW_PAYLOAD_STR))
              .build()
test_class.modifier: private static final
test_class.original_string: private static final JsonObject KNOWN_MESSAGE_AS_JSON = JsonFactory.newObjectBuilder()
              .set(MessageCommand.JsonFields.JSON_MESSAGE_HEADERS, MESSAGE.getHeaders().toJson())
              .set(MessageCommand.JsonFields.JSON_MESSAGE_PAYLOAD, JsonFactory.newObject(KNOWN_RAW_PAYLOAD_STR))
              .build();
test_class.type: JsonObject
test_class.var_name: KNOWN_MESSAGE_AS_JSON
test_class.declarator: KNOWN_JSON = JsonFactory.newObjectBuilder()
              .set(Command.JsonFields.TYPE, SendFeatureMessage.TYPE)
              .set(MessageCommand.JsonFields.JSON_THING_ID, THING_ID.toString())
              .set(SendFeatureMessage.JSON_FEATURE_ID, FEATURE_ID)
              .set(MessageCommand.JsonFields.JSON_MESSAGE, KNOWN_MESSAGE_AS_JSON)
              .build()
test_class.modifier: private static final
test_class.original_string: private static final JsonObject KNOWN_JSON = JsonFactory.newObjectBuilder()
              .set(Command.JsonFields.TYPE, SendFeatureMessage.TYPE)
              .set(MessageCommand.JsonFields.JSON_THING_ID, THING_ID.toString())
              .set(SendFeatureMessage.JSON_FEATURE_ID, FEATURE_ID)
              .set(MessageCommand.JsonFields.JSON_MESSAGE, KNOWN_MESSAGE_AS_JSON)
              .build();
test_class.type: JsonObject
test_class.var_name: KNOWN_JSON
test_class.file: signals/commands/messages/src/test/java/org/eclipse/ditto/signals/commands/messages/SendFeatureMessageTest.java
test_class.identifier: SendFeatureMessageTest
test_case.body: @Test
      public void tryToCreateInstanceWithMissingFeatureId() {
          final MessageHeaders messageHeaders = MessageHeaders.newBuilder(MessageDirection.TO, THING_ID, SUBJECT)
                  .contentType(CONTENT_TYPE)
                  .build();
          final Message<Object> message = MessagesModelFactory.newMessageBuilder(messageHeaders)
                  .payload(JsonFactory.newObject(KNOWN_RAW_PAYLOAD_STR))
                  .build();
  
          assertThatExceptionOfType(FeatureIdInvalidException.class)
                  .isThrownBy(() -> SendFeatureMessage.of(THING_ID, FEATURE_ID, message, DITTO_HEADERS))
                  .withMessage("The Message did not contain a feature ID at all! Expected was feature ID <%s>.",
                          FEATURE_ID)
                  .withNoCause();
      }
test_case.class_method_signature: SendFeatureMessageTest.tryToCreateInstanceWithMissingFeatureId()
test_case.full_signature: @Test public void tryToCreateInstanceWithMissingFeatureId()
test_case.identifier: tryToCreateInstanceWithMissingFeatureId
test_case.invocations: build contentType newBuilder build payload newMessageBuilder newObject withNoCause withMessage isThrownBy assertThatExceptionOfType of
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void tryToCreateInstanceWithMissingFeatureId()
focal_class.declarator: NAME = "featureMessage"
focal_class.modifier: public static final
focal_class.original_string: public static final String NAME = "featureMessage";
focal_class.type: String
focal_class.var_name: NAME
focal_class.declarator: TYPE = TYPE_PREFIX + NAME
focal_class.modifier: public static final
focal_class.original_string: public static final String TYPE = TYPE_PREFIX + NAME;
focal_class.type: String
focal_class.var_name: TYPE
focal_class.declarator: JSON_FEATURE_ID =
              JsonFactory.newStringFieldDefinition("featureId", FieldType.REGULAR, JsonSchemaVersion.V_1,
                      JsonSchemaVersion.V_2)
focal_class.modifier: static final
focal_class.original_string: static final JsonFieldDefinition<String> JSON_FEATURE_ID =
              JsonFactory.newStringFieldDefinition("featureId", FieldType.REGULAR, JsonSchemaVersion.V_1,
                      JsonSchemaVersion.V_2);
focal_class.type: JsonFieldDefinition<String>
focal_class.var_name: JSON_FEATURE_ID
focal_class.declarator: featureId
focal_class.modifier: private final
focal_class.original_string: private final String featureId;
focal_class.type: String
focal_class.var_name: featureId
focal_class.file: signals/commands/messages/src/main/java/org/eclipse/ditto/signals/commands/messages/SendFeatureMessage.java
focal_class.identifier: SendFeatureMessage
focal_class.interfaces: implements WithFeatureId
focal_class.class_method_signature: SendFeatureMessage.SendFeatureMessage(final ThingId thingId,
              final String featureId,
              final Message<T> message,
              final DittoHeaders dittoHeaders)
focal_class.full_signature: private  SendFeatureMessage(final ThingId thingId,
              final String featureId,
              final Message<T> message,
              final DittoHeaders dittoHeaders)
focal_class.identifier: SendFeatureMessage
focal_class.modifiers: private
focal_class.parameters: (final ThingId thingId,
              final String featureId,
              final Message<T> message,
              final DittoHeaders dittoHeaders)
focal_class.signature:  SendFeatureMessage(final ThingId thingId,
              final String featureId,
              final Message<T> message,
              final DittoHeaders dittoHeaders)
focal_class.class_method_signature: SendFeatureMessage.validateMessageFeatureId(final String expectedFeatureId, final Message<?> message,
              final DittoHeaders dittoHeaders)
focal_class.full_signature: private static void validateMessageFeatureId(final String expectedFeatureId, final Message<?> message,
              final DittoHeaders dittoHeaders)
focal_class.identifier: validateMessageFeatureId
focal_class.modifiers: private static
focal_class.parameters: (final String expectedFeatureId, final Message<?> message,
              final DittoHeaders dittoHeaders)
focal_class.return: void
focal_class.signature: void validateMessageFeatureId(final String expectedFeatureId, final Message<?> message,
              final DittoHeaders dittoHeaders)
focal_class.class_method_signature: SendFeatureMessage.of(final String thingId,
              final String featureId,
              final Message<T> message,
              final DittoHeaders dittoHeaders)
focal_class.full_signature: @Deprecated public static SendFeatureMessage<T> of(final String thingId,
              final String featureId,
              final Message<T> message,
              final DittoHeaders dittoHeaders)
focal_class.identifier: of
focal_class.modifiers: @Deprecated public static
focal_class.parameters: (final String thingId,
              final String featureId,
              final Message<T> message,
              final DittoHeaders dittoHeaders)
focal_class.return: SendFeatureMessage<T>
focal_class.signature: SendFeatureMessage<T> of(final String thingId,
              final String featureId,
              final Message<T> message,
              final DittoHeaders dittoHeaders)
focal_class.class_method_signature: SendFeatureMessage.of(final ThingId thingId,
              final String featureId,
              final Message<T> message,
              final DittoHeaders dittoHeaders)
focal_class.full_signature: public static SendFeatureMessage<T> of(final ThingId thingId,
              final String featureId,
              final Message<T> message,
              final DittoHeaders dittoHeaders)
focal_class.identifier: of
focal_class.modifiers: public static
focal_class.parameters: (final ThingId thingId,
              final String featureId,
              final Message<T> message,
              final DittoHeaders dittoHeaders)
focal_class.return: SendFeatureMessage<T>
focal_class.signature: SendFeatureMessage<T> of(final ThingId thingId,
              final String featureId,
              final Message<T> message,
              final DittoHeaders dittoHeaders)
focal_class.class_method_signature: SendFeatureMessage.fromJson(final String jsonString, final DittoHeaders dittoHeaders)
focal_class.full_signature: public static SendFeatureMessage<?> fromJson(final String jsonString, final DittoHeaders dittoHeaders)
focal_class.identifier: fromJson
focal_class.modifiers: public static
focal_class.parameters: (final String jsonString, final DittoHeaders dittoHeaders)
focal_class.return: SendFeatureMessage<?>
focal_class.signature: SendFeatureMessage<?> fromJson(final String jsonString, final DittoHeaders dittoHeaders)
focal_class.class_method_signature: SendFeatureMessage.fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders)
focal_class.full_signature: public static SendFeatureMessage<?> 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: SendFeatureMessage<?>
focal_class.signature: SendFeatureMessage<?> fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders)
focal_class.class_method_signature: SendFeatureMessage.getFeatureId()
focal_class.full_signature: @Override public String getFeatureId()
focal_class.identifier: getFeatureId
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getFeatureId()
focal_class.class_method_signature: SendFeatureMessage.setDittoHeaders(final DittoHeaders dittoHeaders)
focal_class.full_signature: @Override public SendFeatureMessage setDittoHeaders(final DittoHeaders dittoHeaders)
focal_class.identifier: setDittoHeaders
focal_class.modifiers: @Override public
focal_class.parameters: (final DittoHeaders dittoHeaders)
focal_class.return: SendFeatureMessage
focal_class.signature: SendFeatureMessage setDittoHeaders(final DittoHeaders dittoHeaders)
focal_class.class_method_signature: SendFeatureMessage.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: SendFeatureMessage.hashCode()
focal_class.full_signature: @SuppressWarnings("squid:S109") @Override public int hashCode()
focal_class.identifier: hashCode
focal_class.modifiers: @SuppressWarnings("squid:S109") @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int hashCode()
focal_class.class_method_signature: SendFeatureMessage.equals(@Nullable final Object obj)
focal_class.full_signature: @SuppressWarnings("squid:MethodCyclomaticComplexity") @Override public boolean equals(@Nullable final Object obj)
focal_class.identifier: equals
focal_class.modifiers: @SuppressWarnings("squid:MethodCyclomaticComplexity") @Override public
focal_class.parameters: (@Nullable final Object obj)
focal_class.return: boolean
focal_class.signature: boolean equals(@Nullable final Object obj)
focal_class.class_method_signature: SendFeatureMessage.canEqual(@Nullable final Object other)
focal_class.full_signature: @Override protected boolean canEqual(@Nullable final Object other)
focal_class.identifier: canEqual
focal_class.modifiers: @Override protected
focal_class.parameters: (@Nullable final Object other)
focal_class.return: boolean
focal_class.signature: boolean canEqual(@Nullable final Object other)
focal_class.class_method_signature: SendFeatureMessage.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_class.superclass: extends AbstractMessageCommand<T, SendFeatureMessage<T>>
focal_method.body: @Deprecated
      public static <T> SendFeatureMessage<T> of(final String thingId,
              final String featureId,
              final Message<T> message,
              final DittoHeaders dittoHeaders) {
  
          return of(ThingId.of(thingId), featureId, message, dittoHeaders);
      }
focal_method.class_method_signature: SendFeatureMessage.of(final String thingId,
              final String featureId,
              final Message<T> message,
              final DittoHeaders dittoHeaders)
focal_method.full_signature: @Deprecated public static SendFeatureMessage<T> of(final String thingId,
              final String featureId,
              final Message<T> message,
              final DittoHeaders dittoHeaders)
focal_method.identifier: of
focal_method.invocations: of of
focal_method.modifiers: @Deprecated public static
focal_method.parameters: (final String thingId,
              final String featureId,
              final Message<T> message,
              final DittoHeaders dittoHeaders)
focal_method.return: SendFeatureMessage<T>
focal_method.signature: SendFeatureMessage<T> of(final String thingId,
              final String featureId,
              final Message<T> message,
              final DittoHeaders dittoHeaders)