test_class.declarator: KNOWN_CUSTOM_LABEL = AcknowledgementLabel.of("my-custom-ack")
test_class.modifier: private static final
test_class.original_string: private static final AcknowledgementLabel KNOWN_CUSTOM_LABEL = AcknowledgementLabel.of("my-custom-ack");
test_class.type: AcknowledgementLabel
test_class.var_name: KNOWN_CUSTOM_LABEL
test_class.declarator: topicPathMyCustomAck
test_class.modifier: private static
test_class.original_string: private static TopicPath topicPathMyCustomAck;
test_class.type: TopicPath
test_class.var_name: topicPathMyCustomAck
test_class.declarator: underTest
test_class.modifier: private
test_class.original_string: private AcknowledgementAdapter underTest;
test_class.type: AcknowledgementAdapter
test_class.var_name: underTest
test_class.file: protocol-adapter/src/test/java/org/eclipse/ditto/protocoladapter/acknowledgements/AcknowledgementAdapterTest.java
test_class.identifier: AcknowledgementAdapterTest
test_class.interfaces: implements ProtocolAdapterTest
test_case.body: @Test
      public void acknowledgementToAdaptable() {
          final DittoHeaders dittoHeaders = DittoHeaders.newBuilder().randomCorrelationId().build();
          final JsonValue customAckPayload = JsonObject.newBuilder().set("foo", "bar").build();
          final HttpStatusCode status = HttpStatusCode.BAD_REQUEST;
  
          final Acknowledgement acknowledgement = ThingAcknowledgementFactory.newAcknowledgement(KNOWN_CUSTOM_LABEL,
                  TestConstants.THING_ID,
                  status,
                  dittoHeaders,
                  customAckPayload);
  
          final Adaptable expected = Adaptable.newBuilder(topicPathMyCustomAck)
                  .withPayload(Payload.newBuilder(JsonPointer.empty())
                          .withValue(customAckPayload)
                          .withStatus(status)
                          .build())
                  .withHeaders(dittoHeaders)
                  .build();
  
          final Adaptable actual = underTest.toAdaptable(acknowledgement);
  
          assertWithExternalHeadersThat(actual).isEqualTo(expected);
      }
test_case.class_method_signature: AcknowledgementAdapterTest.acknowledgementToAdaptable()
test_case.full_signature: @Test public void acknowledgementToAdaptable()
test_case.identifier: acknowledgementToAdaptable
test_case.invocations: build randomCorrelationId newBuilder build set newBuilder newAcknowledgement build withHeaders withPayload newBuilder build withStatus withValue newBuilder empty toAdaptable isEqualTo assertWithExternalHeadersThat
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void acknowledgementToAdaptable()
focal_class.declarator: headerTranslator
focal_class.modifier: private final
focal_class.original_string: private final HeaderTranslator headerTranslator;
focal_class.type: HeaderTranslator
focal_class.var_name: headerTranslator
focal_class.file: protocol-adapter/src/main/java/org/eclipse/ditto/protocoladapter/acknowledgements/AcknowledgementAdapter.java
focal_class.identifier: AcknowledgementAdapter
focal_class.interfaces: implements Adapter<Acknowledgement>
focal_class.class_method_signature: AcknowledgementAdapter.AcknowledgementAdapter(final HeaderTranslator headerTranslator)
focal_class.full_signature: private  AcknowledgementAdapter(final HeaderTranslator headerTranslator)
focal_class.identifier: AcknowledgementAdapter
focal_class.modifiers: private
focal_class.parameters: (final HeaderTranslator headerTranslator)
focal_class.signature:  AcknowledgementAdapter(final HeaderTranslator headerTranslator)
focal_class.class_method_signature: AcknowledgementAdapter.getInstance(final HeaderTranslator headerTranslator)
focal_class.full_signature: static AcknowledgementAdapter getInstance(final HeaderTranslator headerTranslator)
focal_class.identifier: getInstance
focal_class.modifiers: static
focal_class.parameters: (final HeaderTranslator headerTranslator)
focal_class.return: AcknowledgementAdapter
focal_class.signature: AcknowledgementAdapter getInstance(final HeaderTranslator headerTranslator)
focal_class.class_method_signature: AcknowledgementAdapter.getTopicPathBuilder(final TopicPath.Channel channel,
              final EntityIdWithType entityId)
focal_class.full_signature: static AcknowledgementTopicPathBuilder getTopicPathBuilder(final TopicPath.Channel channel,
              final EntityIdWithType entityId)
focal_class.identifier: getTopicPathBuilder
focal_class.modifiers: static
focal_class.parameters: (final TopicPath.Channel channel,
              final EntityIdWithType entityId)
focal_class.return: AcknowledgementTopicPathBuilder
focal_class.signature: AcknowledgementTopicPathBuilder getTopicPathBuilder(final TopicPath.Channel channel,
              final EntityIdWithType entityId)
focal_class.class_method_signature: AcknowledgementAdapter.fromAdaptable(final Adaptable adaptable)
focal_class.full_signature: @Override public Acknowledgement fromAdaptable(final Adaptable adaptable)
focal_class.identifier: fromAdaptable
focal_class.modifiers: @Override public
focal_class.parameters: (final Adaptable adaptable)
focal_class.return: Acknowledgement
focal_class.signature: Acknowledgement fromAdaptable(final Adaptable adaptable)
focal_class.class_method_signature: AcknowledgementAdapter.getThingId(final Adaptable adaptable)
focal_class.full_signature: private static ThingId getThingId(final Adaptable adaptable)
focal_class.identifier: getThingId
focal_class.modifiers: private static
focal_class.parameters: (final Adaptable adaptable)
focal_class.return: ThingId
focal_class.signature: ThingId getThingId(final Adaptable adaptable)
focal_class.class_method_signature: AcknowledgementAdapter.getStatusCodeOrThrow(final Adaptable adaptable)
focal_class.full_signature: private static HttpStatusCode getStatusCodeOrThrow(final Adaptable adaptable)
focal_class.identifier: getStatusCodeOrThrow
focal_class.modifiers: private static
focal_class.parameters: (final Adaptable adaptable)
focal_class.return: HttpStatusCode
focal_class.signature: HttpStatusCode getStatusCodeOrThrow(final Adaptable adaptable)
focal_class.class_method_signature: AcknowledgementAdapter.getAcknowledgementLabel(final Adaptable adaptable)
focal_class.full_signature: private static AcknowledgementLabel getAcknowledgementLabel(final Adaptable adaptable)
focal_class.identifier: getAcknowledgementLabel
focal_class.modifiers: private static
focal_class.parameters: (final Adaptable adaptable)
focal_class.return: AcknowledgementLabel
focal_class.signature: AcknowledgementLabel getAcknowledgementLabel(final Adaptable adaptable)
focal_class.class_method_signature: AcknowledgementAdapter.getPayloadValueOrNull(final Adaptable adaptable)
focal_class.full_signature: @Nullable private static JsonValue getPayloadValueOrNull(final Adaptable adaptable)
focal_class.identifier: getPayloadValueOrNull
focal_class.modifiers: @Nullable private static
focal_class.parameters: (final Adaptable adaptable)
focal_class.return: JsonValue
focal_class.signature: JsonValue getPayloadValueOrNull(final Adaptable adaptable)
focal_class.class_method_signature: AcknowledgementAdapter.toAdaptable(final Acknowledgement acknowledgement, final TopicPath.Channel channel)
focal_class.full_signature: @Override public Adaptable toAdaptable(final Acknowledgement acknowledgement, final TopicPath.Channel channel)
focal_class.identifier: toAdaptable
focal_class.modifiers: @Override public
focal_class.parameters: (final Acknowledgement acknowledgement, final TopicPath.Channel channel)
focal_class.return: Adaptable
focal_class.signature: Adaptable toAdaptable(final Acknowledgement acknowledgement, final TopicPath.Channel channel)
focal_class.class_method_signature: AcknowledgementAdapter.getGroups()
focal_class.full_signature: @Override public Set<TopicPath.Group> getGroups()
focal_class.identifier: getGroups
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Set<TopicPath.Group>
focal_class.signature: Set<TopicPath.Group> getGroups()
focal_class.class_method_signature: AcknowledgementAdapter.getChannels()
focal_class.full_signature: @Override public Set<TopicPath.Channel> getChannels()
focal_class.identifier: getChannels
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Set<TopicPath.Channel>
focal_class.signature: Set<TopicPath.Channel> getChannels()
focal_class.class_method_signature: AcknowledgementAdapter.getCriteria()
focal_class.full_signature: @Override public Set<TopicPath.Criterion> getCriteria()
focal_class.identifier: getCriteria
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Set<TopicPath.Criterion>
focal_class.signature: Set<TopicPath.Criterion> getCriteria()
focal_class.class_method_signature: AcknowledgementAdapter.getActions()
focal_class.full_signature: @Override public Set<TopicPath.Action> getActions()
focal_class.identifier: getActions
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Set<TopicPath.Action>
focal_class.signature: Set<TopicPath.Action> getActions()
focal_class.class_method_signature: AcknowledgementAdapter.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: AcknowledgementAdapter.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: AcknowledgementAdapter.getTopicPath(final Acknowledgement acknowledgement, final TopicPath.Channel channel)
focal_class.full_signature: private static TopicPath getTopicPath(final Acknowledgement acknowledgement, final TopicPath.Channel channel)
focal_class.identifier: getTopicPath
focal_class.modifiers: private static
focal_class.parameters: (final Acknowledgement acknowledgement, final TopicPath.Channel channel)
focal_class.return: TopicPath
focal_class.signature: TopicPath getTopicPath(final Acknowledgement acknowledgement, final TopicPath.Channel channel)
focal_class.class_method_signature: AcknowledgementAdapter.getPayload(final Acknowledgement acknowledgement)
focal_class.full_signature: private static Payload getPayload(final Acknowledgement acknowledgement)
focal_class.identifier: getPayload
focal_class.modifiers: private static
focal_class.parameters: (final Acknowledgement acknowledgement)
focal_class.return: Payload
focal_class.signature: Payload getPayload(final Acknowledgement acknowledgement)
focal_class.class_method_signature: AcknowledgementAdapter.getExternalHeaders(final DittoHeaders acknowledgementHeaders)
focal_class.full_signature: private DittoHeaders getExternalHeaders(final DittoHeaders acknowledgementHeaders)
focal_class.identifier: getExternalHeaders
focal_class.modifiers: private
focal_class.parameters: (final DittoHeaders acknowledgementHeaders)
focal_class.return: DittoHeaders
focal_class.signature: DittoHeaders getExternalHeaders(final DittoHeaders acknowledgementHeaders)
focal_method.body: @Override
      public Adaptable toAdaptable(final Acknowledgement acknowledgement, final TopicPath.Channel channel) {
          if (DittoAcknowledgementLabel.contains(acknowledgement.getLabel())) {
              throw new DittoAcknowledgementLabelExternalUseForbiddenException(acknowledgement.getLabel());
          }
          return Adaptable.newBuilder(getTopicPath(acknowledgement, channel))
                  .withPayload(getPayload(acknowledgement))
                  .withHeaders(getExternalHeaders(acknowledgement.getDittoHeaders()))
                  .build();
      }
focal_method.class_method_signature: AcknowledgementAdapter.toAdaptable(final Acknowledgement acknowledgement, final TopicPath.Channel channel)
focal_method.full_signature: @Override public Adaptable toAdaptable(final Acknowledgement acknowledgement, final TopicPath.Channel channel)
focal_method.identifier: toAdaptable
focal_method.invocations: contains getLabel getLabel build withHeaders withPayload newBuilder getTopicPath getPayload getExternalHeaders getDittoHeaders
focal_method.modifiers: @Override public
focal_method.parameters: (final Acknowledgement acknowledgement, final TopicPath.Channel channel)
focal_method.return: Adaptable
focal_method.signature: Adaptable toAdaptable(final Acknowledgement acknowledgement, final TopicPath.Channel channel)