test_class.declarator: KNOWN_CUSTOM_LABEL = AcknowledgementLabel.of("success-ack")
test_class.modifier: private static final
test_class.original_string: private static final AcknowledgementLabel KNOWN_CUSTOM_LABEL = AcknowledgementLabel.of("success-ack");
test_class.type: AcknowledgementLabel
test_class.var_name: KNOWN_CUSTOM_LABEL
test_class.declarator: KNOWN_STATUS = HttpStatusCode.CREATED
test_class.modifier: private static final
test_class.original_string: private static final HttpStatusCode KNOWN_STATUS = HttpStatusCode.CREATED;
test_class.type: HttpStatusCode
test_class.var_name: KNOWN_STATUS
test_class.declarator: KNOWN_HEADERS = DittoHeaders.newBuilder()
              .correlationId("foobar")
              .build()
test_class.modifier: private static final
test_class.original_string: private static final DittoHeaders KNOWN_HEADERS = DittoHeaders.newBuilder()
              .correlationId("foobar")
              .build();
test_class.type: DittoHeaders
test_class.var_name: KNOWN_HEADERS
test_class.declarator: KNOWN_PAYLOAD = JsonObject.newBuilder()
              .set("foo", 42)
              .build()
test_class.modifier: private static final
test_class.original_string: private static final JsonValue KNOWN_PAYLOAD = JsonObject.newBuilder()
              .set("foo", 42)
              .build();
test_class.type: JsonValue
test_class.var_name: KNOWN_PAYLOAD
test_class.declarator: KNOWN_ACK_SUCCESS =
              ThingAcknowledgementFactory.newAcknowledgement(KNOWN_CUSTOM_LABEL,
                      TestConstants.THING_ID,
                      KNOWN_STATUS,
                      KNOWN_HEADERS,
                      KNOWN_PAYLOAD)
test_class.modifier: private static final
test_class.original_string: private static final Acknowledgement KNOWN_ACK_SUCCESS =
              ThingAcknowledgementFactory.newAcknowledgement(KNOWN_CUSTOM_LABEL,
                      TestConstants.THING_ID,
                      KNOWN_STATUS,
                      KNOWN_HEADERS,
                      KNOWN_PAYLOAD);
test_class.type: Acknowledgement
test_class.var_name: KNOWN_ACK_SUCCESS
test_class.declarator: KNOWN_CUSTOM_LABEL_2 = AcknowledgementLabel.of("error-ack")
test_class.modifier: private static final
test_class.original_string: private static final AcknowledgementLabel KNOWN_CUSTOM_LABEL_2 = AcknowledgementLabel.of("error-ack");
test_class.type: AcknowledgementLabel
test_class.var_name: KNOWN_CUSTOM_LABEL_2
test_class.declarator: KNOWN_STATUS_2 = HttpStatusCode.CONFLICT
test_class.modifier: private static final
test_class.original_string: private static final HttpStatusCode KNOWN_STATUS_2 = HttpStatusCode.CONFLICT;
test_class.type: HttpStatusCode
test_class.var_name: KNOWN_STATUS_2
test_class.declarator: KNOWN_HEADERS_2 = DittoHeaders.newBuilder()
              .correlationId("foobar")
              .build()
test_class.modifier: private static final
test_class.original_string: private static final DittoHeaders KNOWN_HEADERS_2 = DittoHeaders.newBuilder()
              .correlationId("foobar")
              .build();
test_class.type: DittoHeaders
test_class.var_name: KNOWN_HEADERS_2
test_class.declarator: KNOWN_PAYLOAD_2 = null
test_class.modifier: private static final
test_class.original_string: private static final JsonValue KNOWN_PAYLOAD_2 = null;
test_class.type: JsonValue
test_class.var_name: KNOWN_PAYLOAD_2
test_class.declarator: KNOWN_ACK_2_ERROR =
              ThingAcknowledgementFactory.newAcknowledgement(KNOWN_CUSTOM_LABEL_2,
                      TestConstants.THING_ID,
                      KNOWN_STATUS_2,
                      KNOWN_HEADERS_2,
                      KNOWN_PAYLOAD_2)
test_class.modifier: private static final
test_class.original_string: private static final Acknowledgement KNOWN_ACK_2_ERROR =
              ThingAcknowledgementFactory.newAcknowledgement(KNOWN_CUSTOM_LABEL_2,
                      TestConstants.THING_ID,
                      KNOWN_STATUS_2,
                      KNOWN_HEADERS_2,
                      KNOWN_PAYLOAD_2);
test_class.type: Acknowledgement
test_class.var_name: KNOWN_ACK_2_ERROR
test_class.declarator: KNOWN_CUSTOM_LABEL_3 = AcknowledgementLabel.of("second-success-ack")
test_class.modifier: private static final
test_class.original_string: private static final AcknowledgementLabel KNOWN_CUSTOM_LABEL_3 = AcknowledgementLabel.of("second-success-ack");
test_class.type: AcknowledgementLabel
test_class.var_name: KNOWN_CUSTOM_LABEL_3
test_class.declarator: KNOWN_STATUS_3 = HttpStatusCode.NO_CONTENT
test_class.modifier: private static final
test_class.original_string: private static final HttpStatusCode KNOWN_STATUS_3 = HttpStatusCode.NO_CONTENT;
test_class.type: HttpStatusCode
test_class.var_name: KNOWN_STATUS_3
test_class.declarator: KNOWN_HEADERS_3 = DittoHeaders.newBuilder()
              .correlationId("foobar")
              .build()
test_class.modifier: private static final
test_class.original_string: private static final DittoHeaders KNOWN_HEADERS_3 = DittoHeaders.newBuilder()
              .correlationId("foobar")
              .build();
test_class.type: DittoHeaders
test_class.var_name: KNOWN_HEADERS_3
test_class.declarator: KNOWN_PAYLOAD_3 = JsonValue.of("Hello world!")
test_class.modifier: private static final
test_class.original_string: private static final JsonValue KNOWN_PAYLOAD_3 = JsonValue.of("Hello world!");
test_class.type: JsonValue
test_class.var_name: KNOWN_PAYLOAD_3
test_class.declarator: KNOWN_ACK_3_SUCCESS = ThingAcknowledgementFactory.newAcknowledgement(
              KNOWN_CUSTOM_LABEL_3,
              TestConstants.THING_ID,
              KNOWN_STATUS_3,
              KNOWN_HEADERS_3,
              KNOWN_PAYLOAD_3)
test_class.modifier: private static final
test_class.original_string: private static final Acknowledgement KNOWN_ACK_3_SUCCESS = ThingAcknowledgementFactory.newAcknowledgement(
              KNOWN_CUSTOM_LABEL_3,
              TestConstants.THING_ID,
              KNOWN_STATUS_3,
              KNOWN_HEADERS_3,
              KNOWN_PAYLOAD_3);
test_class.type: Acknowledgement
test_class.var_name: KNOWN_ACK_3_SUCCESS
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 AcknowledgementsAdapter underTest;
test_class.type: AcknowledgementsAdapter
test_class.var_name: underTest
test_class.file: protocol-adapter/src/test/java/org/eclipse/ditto/protocoladapter/acknowledgements/AcknowledgementsAdapterTest.java
test_class.identifier: AcknowledgementsAdapterTest
test_class.interfaces: implements ProtocolAdapterTest
test_case.body: @Test
      public void acknowledgementsContaining1ToAdaptable() {
          final Acknowledgements acknowledgements = ThingAcknowledgementsFactory.newAcknowledgements(
                  Collections.singletonList(KNOWN_ACK_2_ERROR), KNOWN_HEADERS);
  
          final Adaptable expected = Adaptable.newBuilder(topicPathMyCustomAck)
                  .withPayload(Payload.newBuilder(JsonPointer.empty())
                          .withStatus(KNOWN_STATUS_2)
                          .withValue(JsonObject.newBuilder()
                                  .set(KNOWN_CUSTOM_LABEL_2, JsonObject.newBuilder()
                                          .set("status", KNOWN_STATUS_2.toInt())
                                          .set("headers", KNOWN_HEADERS_2.toJson())
                                          .build())
                                  .build())
                          .build())
                  .build();
  
          final Adaptable actual = underTest.toAdaptable(acknowledgements);
  
          assertWithExternalHeadersThat(actual).isEqualTo(expected);
      }
test_case.class_method_signature: AcknowledgementsAdapterTest.acknowledgementsContaining1ToAdaptable()
test_case.full_signature: @Test public void acknowledgementsContaining1ToAdaptable()
test_case.identifier: acknowledgementsContaining1ToAdaptable
test_case.invocations: newAcknowledgements singletonList build withPayload newBuilder build withValue withStatus newBuilder empty build set newBuilder build set set newBuilder toInt toJson toAdaptable isEqualTo assertWithExternalHeadersThat
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void acknowledgementsContaining1ToAdaptable()
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/AcknowledgementsAdapter.java
focal_class.identifier: AcknowledgementsAdapter
focal_class.interfaces: implements Adapter<Acknowledgements>
focal_class.class_method_signature: AcknowledgementsAdapter.AcknowledgementsAdapter(final HeaderTranslator headerTranslator)
focal_class.full_signature: private  AcknowledgementsAdapter(final HeaderTranslator headerTranslator)
focal_class.identifier: AcknowledgementsAdapter
focal_class.modifiers: private
focal_class.parameters: (final HeaderTranslator headerTranslator)
focal_class.signature:  AcknowledgementsAdapter(final HeaderTranslator headerTranslator)
focal_class.class_method_signature: AcknowledgementsAdapter.getInstance(final HeaderTranslator headerTranslator)
focal_class.full_signature: static AcknowledgementsAdapter getInstance(final HeaderTranslator headerTranslator)
focal_class.identifier: getInstance
focal_class.modifiers: static
focal_class.parameters: (final HeaderTranslator headerTranslator)
focal_class.return: AcknowledgementsAdapter
focal_class.signature: AcknowledgementsAdapter getInstance(final HeaderTranslator headerTranslator)
focal_class.class_method_signature: AcknowledgementsAdapter.fromAdaptable(final Adaptable adaptable)
focal_class.full_signature: @Override public Acknowledgements fromAdaptable(final Adaptable adaptable)
focal_class.identifier: fromAdaptable
focal_class.modifiers: @Override public
focal_class.parameters: (final Adaptable adaptable)
focal_class.return: Acknowledgements
focal_class.signature: Acknowledgements fromAdaptable(final Adaptable adaptable)
focal_class.class_method_signature: AcknowledgementsAdapter.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: AcknowledgementsAdapter.gatherContainedAcknowledgements(final Adaptable adaptable,
              final ThingId thingId)
focal_class.full_signature: private static List<Acknowledgement> gatherContainedAcknowledgements(final Adaptable adaptable,
              final ThingId thingId)
focal_class.identifier: gatherContainedAcknowledgements
focal_class.modifiers: private static
focal_class.parameters: (final Adaptable adaptable,
              final ThingId thingId)
focal_class.return: List<Acknowledgement>
focal_class.signature: List<Acknowledgement> gatherContainedAcknowledgements(final Adaptable adaptable,
              final ThingId thingId)
focal_class.class_method_signature: AcknowledgementsAdapter.buildAcknowledgements(final ThingId thingId, final JsonValue value)
focal_class.full_signature: private static List<Acknowledgement> buildAcknowledgements(final ThingId thingId, final JsonValue value)
focal_class.identifier: buildAcknowledgements
focal_class.modifiers: private static
focal_class.parameters: (final ThingId thingId, final JsonValue value)
focal_class.return: List<Acknowledgement>
focal_class.signature: List<Acknowledgement> buildAcknowledgements(final ThingId thingId, final JsonValue value)
focal_class.class_method_signature: AcknowledgementsAdapter.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: AcknowledgementsAdapter.toAdaptable(final Acknowledgements acknowledgements, final TopicPath.Channel channel)
focal_class.full_signature: @Override public Adaptable toAdaptable(final Acknowledgements acknowledgements, final TopicPath.Channel channel)
focal_class.identifier: toAdaptable
focal_class.modifiers: @Override public
focal_class.parameters: (final Acknowledgements acknowledgements, final TopicPath.Channel channel)
focal_class.return: Adaptable
focal_class.signature: Adaptable toAdaptable(final Acknowledgements acknowledgements, final TopicPath.Channel channel)
focal_class.class_method_signature: AcknowledgementsAdapter.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: AcknowledgementsAdapter.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: AcknowledgementsAdapter.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: AcknowledgementsAdapter.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: AcknowledgementsAdapter.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: AcknowledgementsAdapter.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: AcknowledgementsAdapter.getTopicPath(final Acknowledgements acknowledgement, final TopicPath.Channel channel)
focal_class.full_signature: private static TopicPath getTopicPath(final Acknowledgements acknowledgement, final TopicPath.Channel channel)
focal_class.identifier: getTopicPath
focal_class.modifiers: private static
focal_class.parameters: (final Acknowledgements acknowledgement, final TopicPath.Channel channel)
focal_class.return: TopicPath
focal_class.signature: TopicPath getTopicPath(final Acknowledgements acknowledgement, final TopicPath.Channel channel)
focal_class.class_method_signature: AcknowledgementsAdapter.getPayload(final Acknowledgements acknowledgements)
focal_class.full_signature: private static Payload getPayload(final Acknowledgements acknowledgements)
focal_class.identifier: getPayload
focal_class.modifiers: private static
focal_class.parameters: (final Acknowledgements acknowledgements)
focal_class.return: Payload
focal_class.signature: Payload getPayload(final Acknowledgements acknowledgements)
focal_class.class_method_signature: AcknowledgementsAdapter.getPayloadValue(final Acknowledgements acknowledgements)
focal_class.full_signature: private static JsonObject getPayloadValue(final Acknowledgements acknowledgements)
focal_class.identifier: getPayloadValue
focal_class.modifiers: private static
focal_class.parameters: (final Acknowledgements acknowledgements)
focal_class.return: JsonObject
focal_class.signature: JsonObject getPayloadValue(final Acknowledgements acknowledgements)
focal_class.class_method_signature: AcknowledgementsAdapter.toJsonWithoutLabel(final Acknowledgement ack)
focal_class.full_signature: private static JsonObject toJsonWithoutLabel(final Acknowledgement ack)
focal_class.identifier: toJsonWithoutLabel
focal_class.modifiers: private static
focal_class.parameters: (final Acknowledgement ack)
focal_class.return: JsonObject
focal_class.signature: JsonObject toJsonWithoutLabel(final Acknowledgement ack)
focal_class.class_method_signature: AcknowledgementsAdapter.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 Acknowledgements acknowledgements, final TopicPath.Channel channel) {
          return Adaptable.newBuilder(getTopicPath(acknowledgements, channel))
                  .withPayload(getPayload(acknowledgements))
                  .withHeaders(getExternalHeaders(acknowledgements.getDittoHeaders()))
                  .build();
      }
focal_method.class_method_signature: AcknowledgementsAdapter.toAdaptable(final Acknowledgements acknowledgements, final TopicPath.Channel channel)
focal_method.full_signature: @Override public Adaptable toAdaptable(final Acknowledgements acknowledgements, final TopicPath.Channel channel)
focal_method.identifier: toAdaptable
focal_method.invocations: build withHeaders withPayload newBuilder getTopicPath getPayload getExternalHeaders getDittoHeaders
focal_method.modifiers: @Override public
focal_method.parameters: (final Acknowledgements acknowledgements, final TopicPath.Channel channel)
focal_method.return: Adaptable
focal_method.signature: Adaptable toAdaptable(final Acknowledgements acknowledgements, final TopicPath.Channel channel)