test_class.declarator: APPLICATION_JSON = "application/json"
test_class.modifier: private static final
test_class.original_string: private static final String APPLICATION_JSON = "application/json";
test_class.type: String
test_class.var_name: APPLICATION_JSON
test_class.declarator: APPLICATION_OCTET_STREAM = "application/octet-stream"
test_class.modifier: private static final
test_class.original_string: private static final String APPLICATION_OCTET_STREAM = "application/octet-stream";
test_class.type: String
test_class.var_name: APPLICATION_OCTET_STREAM
test_class.declarator: BINARY_PAYLOAD = "binary payload".getBytes(StandardCharsets.UTF_8)
test_class.modifier: private static final
test_class.original_string: private static final byte[] BINARY_PAYLOAD = "binary payload".getBytes(StandardCharsets.UTF_8);
test_class.type: byte[]
test_class.var_name: BINARY_PAYLOAD
test_class.declarator: XML_PAYLOAD = "<xml>test</xml>"
test_class.modifier: private static final
test_class.original_string: private static final String XML_PAYLOAD = "<xml>test</xml>";
test_class.type: String
test_class.var_name: XML_PAYLOAD
test_class.declarator: underTest
test_class.modifier: private
test_class.original_string: private MessageCommandAdapter underTest;
test_class.type: MessageCommandAdapter
test_class.var_name: underTest
test_class.declarator: version
test_class.modifier: @Parameterized.Parameter
      public
test_class.original_string: @Parameterized.Parameter
      public JsonSchemaVersion version;
test_class.type: JsonSchemaVersion
test_class.var_name: version
test_class.declarator: direction
test_class.modifier: @Parameterized.Parameter(1)
      public
test_class.original_string: @Parameterized.Parameter(1)
      public MessageDirection direction;
test_class.type: MessageDirection
test_class.var_name: direction
test_class.declarator: type
test_class.modifier: @Parameterized.Parameter(2)
      public
test_class.original_string: @Parameterized.Parameter(2)
      public String type;
test_class.type: String
test_class.var_name: type
test_class.declarator: payload
test_class.modifier: @Parameterized.Parameter(3)
      public
test_class.original_string: @Parameterized.Parameter(3)
      public TestPayload payload;
test_class.type: TestPayload
test_class.var_name: payload
test_class.file: protocol-adapter/src/test/java/org/eclipse/ditto/protocoladapter/things/MessageCommandAdapterTest.java
test_class.identifier: MessageCommandAdapterTest
test_class.interfaces: implements ProtocolAdapterTest
test_case.body: @Test
      public void testMessageToAdaptable() {
          final String subject = subject();
          final String contentType = payload.contentType;
          final JsonPointer path = path(subject);
  
          // build expected adaptable
          final TopicPath topicPath = TopicPath.newBuilder(TestConstants.THING_ID)
                  .live()
                  .messages()
                  .subject(subject)
                  .build();
  
          final PayloadBuilder payloadBuilder = Payload.newBuilder(path);
          if (payload.asJson != null) {
              payloadBuilder.withValue(payload.asJson);
          }
  
          final Adaptable expectedAdaptable = Adaptable.newBuilder(topicPath)
                  .withPayload(payloadBuilder.build())
                  .withHeaders(expectedAdaptableHeaders(contentType))
                  .build();
  
          // build the message that will be converted to an adaptable
          final MessageHeaders messageHeaders = messageHeaders(subject, contentType);
          final Message<Object> theMessage = message(messageHeaders, payload.asObject);
          final DittoHeaders theHeaders = dittoHeaders();
          final MessageCommand<?, ?> messageCommand = messageCommand(type, theMessage, theHeaders);
  
          // test
          final Adaptable actual = underTest.toAdaptable(messageCommand);
          assertThat(actual).isEqualTo(expectedAdaptable);
      }
test_case.class_method_signature: MessageCommandAdapterTest.testMessageToAdaptable()
test_case.full_signature: @Test public void testMessageToAdaptable()
test_case.identifier: testMessageToAdaptable
test_case.invocations: subject path build subject messages live newBuilder newBuilder withValue build withHeaders withPayload newBuilder build expectedAdaptableHeaders messageHeaders message dittoHeaders messageCommand toAdaptable isEqualTo assertThat
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testMessageToAdaptable()
focal_class.declarator: TO_ADAPTABLE_MAPPER = SignalMapperFactory.newMessageCommandSignalMapper()
focal_class.modifier: private static final
focal_class.original_string: private static final SignalMapper<MessageCommand<?, ?>>
              TO_ADAPTABLE_MAPPER = SignalMapperFactory.newMessageCommandSignalMapper();
focal_class.type: SignalMapper<MessageCommand<?, ?>>
focal_class.var_name: TO_ADAPTABLE_MAPPER
focal_class.file: protocol-adapter/src/main/java/org/eclipse/ditto/protocoladapter/things/MessageCommandAdapter.java
focal_class.identifier: MessageCommandAdapter
focal_class.interfaces: implements ThingMessageAdapter<MessageCommand<?, ?>>
focal_class.class_method_signature: MessageCommandAdapter.MessageCommandAdapter(final HeaderTranslator headerTranslator)
focal_class.full_signature: private  MessageCommandAdapter(final HeaderTranslator headerTranslator)
focal_class.identifier: MessageCommandAdapter
focal_class.modifiers: private
focal_class.parameters: (final HeaderTranslator headerTranslator)
focal_class.signature:  MessageCommandAdapter(final HeaderTranslator headerTranslator)
focal_class.class_method_signature: MessageCommandAdapter.of(final HeaderTranslator headerTranslator)
focal_class.full_signature: public static MessageCommandAdapter of(final HeaderTranslator headerTranslator)
focal_class.identifier: of
focal_class.modifiers: public static
focal_class.parameters: (final HeaderTranslator headerTranslator)
focal_class.return: MessageCommandAdapter
focal_class.signature: MessageCommandAdapter of(final HeaderTranslator headerTranslator)
focal_class.class_method_signature: MessageCommandAdapter.toAdaptable(final MessageCommand<?, ?> t)
focal_class.full_signature: @Override public Adaptable toAdaptable(final MessageCommand<?, ?> t)
focal_class.identifier: toAdaptable
focal_class.modifiers: @Override public
focal_class.parameters: (final MessageCommand<?, ?> t)
focal_class.return: Adaptable
focal_class.signature: Adaptable toAdaptable(final MessageCommand<?, ?> t)
focal_class.class_method_signature: MessageCommandAdapter.isForResponses()
focal_class.full_signature: @Override public boolean isForResponses()
focal_class.identifier: isForResponses
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isForResponses()
focal_class.class_method_signature: MessageCommandAdapter.requiresSubject()
focal_class.full_signature: @Override public boolean requiresSubject()
focal_class.identifier: requiresSubject
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean requiresSubject()
focal_class.class_method_signature: MessageCommandAdapter.getType(final Adaptable adaptable)
focal_class.full_signature: @Override protected String getType(final Adaptable adaptable)
focal_class.identifier: getType
focal_class.modifiers: @Override protected
focal_class.parameters: (final Adaptable adaptable)
focal_class.return: String
focal_class.signature: String getType(final Adaptable adaptable)
focal_class.class_method_signature: MessageCommandAdapter.mapSignalToAdaptable(final MessageCommand<?, ?> command, final TopicPath.Channel channel)
focal_class.full_signature: @Override public Adaptable mapSignalToAdaptable(final MessageCommand<?, ?> command, final TopicPath.Channel channel)
focal_class.identifier: mapSignalToAdaptable
focal_class.modifiers: @Override public
focal_class.parameters: (final MessageCommand<?, ?> command, final TopicPath.Channel channel)
focal_class.return: Adaptable
focal_class.signature: Adaptable mapSignalToAdaptable(final MessageCommand<?, ?> command, final TopicPath.Channel channel)
focal_class.superclass: extends AbstractAdapter<MessageCommand<?, ?>>
focal_method.body: @Override
      public Adaptable toAdaptable(final MessageCommand<?, ?> t) {
          return toAdaptable(t, TopicPath.Channel.LIVE);
      }
focal_method.class_method_signature: MessageCommandAdapter.toAdaptable(final MessageCommand<?, ?> t)
focal_method.full_signature: @Override public Adaptable toAdaptable(final MessageCommand<?, ?> t)
focal_method.identifier: toAdaptable
focal_method.invocations: toAdaptable
focal_method.modifiers: @Override public
focal_method.parameters: (final MessageCommand<?, ?> t)
focal_method.return: Adaptable
focal_method.signature: Adaptable toAdaptable(final MessageCommand<?, ?> t)