test_class.declarator: underTest
test_class.modifier: private
test_class.original_string: private PolicyErrorResponseAdapter underTest;
test_class.type: PolicyErrorResponseAdapter
test_class.var_name: underTest
test_class.declarator: dittoRuntimeException
test_class.modifier: private
test_class.original_string: private DittoRuntimeException dittoRuntimeException;
test_class.type: DittoRuntimeException
test_class.var_name: dittoRuntimeException
test_class.file: protocol-adapter/src/test/java/org/eclipse/ditto/protocoladapter/policies/PolicyErrorResponseAdapterTest.java
test_class.identifier: PolicyErrorResponseAdapterTest
test_class.interfaces: implements ProtocolAdapterTest
test_case.body: @Test
      public void testToAdaptable() {
          final PolicyErrorResponse policyErrorResponse =
                  PolicyErrorResponse.of(TestConstants.Policies.POLICY_ID, dittoRuntimeException);
  
          final TopicPath topicPath =
                  TopicPath.newBuilder(TestConstants.Policies.POLICY_ID).policies().none().errors().build();
          final JsonPointer path = JsonPointer.empty();
  
          final Adaptable expected = Adaptable.newBuilder(topicPath)
                  .withPayload(Payload.newBuilder(path)
                          .withValue(dittoRuntimeException.toJson(FieldType.regularOrSpecial()))
                          .withStatus(HttpStatusCode.UNAUTHORIZED)
                          .build())
                  .withHeaders(TestConstants.HEADERS_V_2)
                  .build();
  
          final Adaptable actual = underTest.toAdaptable(policyErrorResponse, TopicPath.Channel.NONE);
          assertWithExternalHeadersThat(actual).isEqualTo(expected);
      }
test_case.class_method_signature: PolicyErrorResponseAdapterTest.testToAdaptable()
test_case.full_signature: @Test public void testToAdaptable()
test_case.identifier: testToAdaptable
test_case.invocations: of build errors none policies newBuilder empty build withHeaders withPayload newBuilder build withStatus withValue newBuilder toJson regularOrSpecial toAdaptable isEqualTo assertWithExternalHeadersThat
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testToAdaptable()
focal_class.file: protocol-adapter/src/main/java/org/eclipse/ditto/protocoladapter/policies/PolicyErrorResponseAdapter.java
focal_class.identifier: PolicyErrorResponseAdapter
focal_class.interfaces: implements PolicyAdapter<PolicyErrorResponse>
focal_class.class_method_signature: PolicyErrorResponseAdapter.PolicyErrorResponseAdapter(final HeaderTranslator headerTranslator,
              final ErrorRegistry<DittoRuntimeException> errorRegistry)
focal_class.full_signature: private  PolicyErrorResponseAdapter(final HeaderTranslator headerTranslator,
              final ErrorRegistry<DittoRuntimeException> errorRegistry)
focal_class.identifier: PolicyErrorResponseAdapter
focal_class.modifiers: private
focal_class.parameters: (final HeaderTranslator headerTranslator,
              final ErrorRegistry<DittoRuntimeException> errorRegistry)
focal_class.signature:  PolicyErrorResponseAdapter(final HeaderTranslator headerTranslator,
              final ErrorRegistry<DittoRuntimeException> errorRegistry)
focal_class.class_method_signature: PolicyErrorResponseAdapter.of(final HeaderTranslator headerTranslator,
              final ErrorRegistry<DittoRuntimeException> errorRegistry)
focal_class.full_signature: public static PolicyErrorResponseAdapter of(final HeaderTranslator headerTranslator,
              final ErrorRegistry<DittoRuntimeException> errorRegistry)
focal_class.identifier: of
focal_class.modifiers: public static
focal_class.parameters: (final HeaderTranslator headerTranslator,
              final ErrorRegistry<DittoRuntimeException> errorRegistry)
focal_class.return: PolicyErrorResponseAdapter
focal_class.signature: PolicyErrorResponseAdapter of(final HeaderTranslator headerTranslator,
              final ErrorRegistry<DittoRuntimeException> errorRegistry)
focal_class.class_method_signature: PolicyErrorResponseAdapter.getTopicPathBuilder(final PolicyErrorResponse errorResponse)
focal_class.full_signature: @Override public TopicPathBuilder getTopicPathBuilder(final PolicyErrorResponse errorResponse)
focal_class.identifier: getTopicPathBuilder
focal_class.modifiers: @Override public
focal_class.parameters: (final PolicyErrorResponse errorResponse)
focal_class.return: TopicPathBuilder
focal_class.signature: TopicPathBuilder getTopicPathBuilder(final PolicyErrorResponse errorResponse)
focal_class.class_method_signature: PolicyErrorResponseAdapter.buildErrorResponse(final TopicPath topicPath, final DittoRuntimeException exception,
              final DittoHeaders dittoHeaders)
focal_class.full_signature: @Override public PolicyErrorResponse buildErrorResponse(final TopicPath topicPath, final DittoRuntimeException exception,
              final DittoHeaders dittoHeaders)
focal_class.identifier: buildErrorResponse
focal_class.modifiers: @Override public
focal_class.parameters: (final TopicPath topicPath, final DittoRuntimeException exception,
              final DittoHeaders dittoHeaders)
focal_class.return: PolicyErrorResponse
focal_class.signature: PolicyErrorResponse buildErrorResponse(final TopicPath topicPath, final DittoRuntimeException exception,
              final DittoHeaders dittoHeaders)
focal_class.superclass: extends AbstractErrorResponseAdapter<PolicyErrorResponse>
focal_method.body: public static PolicyErrorResponseAdapter of(final HeaderTranslator headerTranslator,
              final ErrorRegistry<DittoRuntimeException> errorRegistry) {
          return new PolicyErrorResponseAdapter(requireNonNull(headerTranslator), errorRegistry);
      }
focal_method.class_method_signature: PolicyErrorResponseAdapter.of(final HeaderTranslator headerTranslator,
              final ErrorRegistry<DittoRuntimeException> errorRegistry)
focal_method.full_signature: public static PolicyErrorResponseAdapter of(final HeaderTranslator headerTranslator,
              final ErrorRegistry<DittoRuntimeException> errorRegistry)
focal_method.identifier: of
focal_method.invocations: requireNonNull
focal_method.modifiers: public static
focal_method.parameters: (final HeaderTranslator headerTranslator,
              final ErrorRegistry<DittoRuntimeException> errorRegistry)
focal_method.return: PolicyErrorResponseAdapter
focal_method.signature: PolicyErrorResponseAdapter of(final HeaderTranslator headerTranslator,
              final ErrorRegistry<DittoRuntimeException> errorRegistry)