test_class.file: model/base/src/test/java/org/eclipse/ditto/model/base/exceptions/SignalEnrichmentFailedExceptionTest.java
test_class.identifier: SignalEnrichmentFailedExceptionTest
test_case.body: @Test
      public void buildForCause() {
          final DittoHeaderInvalidException cause =
                  DittoHeaderInvalidException.newInvalidTypeBuilder("theHeaderName", "theValue", "theExpectedType")
                          .build();
  
          final SignalEnrichmentFailedException underTest = SignalEnrichmentFailedException.dueTo(cause);
  
          assertThat(underTest.getStatusCode()).isEqualTo(cause.getStatusCode());
          assertThat(underTest.getDescription().orElseThrow(() -> new AssertionError("Expect description")))
                  .contains(cause.getErrorCode())
                  .contains(cause.getMessage())
                  .contains(cause.getDescription().orElse("-----NOT POSSIBLE-----"));
      }
test_case.class_method_signature: SignalEnrichmentFailedExceptionTest.buildForCause()
test_case.full_signature: @Test public void buildForCause()
test_case.identifier: buildForCause
test_case.invocations: build newInvalidTypeBuilder dueTo isEqualTo assertThat getStatusCode getStatusCode contains contains contains assertThat orElseThrow getDescription getErrorCode getMessage orElse getDescription
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void buildForCause()
focal_class.declarator: ERROR_CODE = "signal.enrichment.failed"
focal_class.modifier: public static final
focal_class.original_string: public static final String ERROR_CODE = "signal.enrichment.failed";
focal_class.type: String
focal_class.var_name: ERROR_CODE
focal_class.declarator: DEFAULT_STATUS_CODE = HttpStatusCode.INTERNAL_SERVER_ERROR
focal_class.modifier: private static final
focal_class.original_string: private static final HttpStatusCode DEFAULT_STATUS_CODE = HttpStatusCode.INTERNAL_SERVER_ERROR;
focal_class.type: HttpStatusCode
focal_class.var_name: DEFAULT_STATUS_CODE
focal_class.declarator: DEFAULT_MESSAGE = "Signal enrichment failed."
focal_class.modifier: private static final
focal_class.original_string: private static final String DEFAULT_MESSAGE = "Signal enrichment failed.";
focal_class.type: String
focal_class.var_name: DEFAULT_MESSAGE
focal_class.declarator: DESCRIPTION_TEMPLATE = "Cause: {0} {1} {2}"
focal_class.modifier: private static final
focal_class.original_string: private static final String DESCRIPTION_TEMPLATE = "Cause: {0} {1} {2}";
focal_class.type: String
focal_class.var_name: DESCRIPTION_TEMPLATE
focal_class.declarator: DEFAULT_DESCRIPTION = "The cause is unknown. Please try again later."
focal_class.modifier: private static final
focal_class.original_string: private static final String DEFAULT_DESCRIPTION = "The cause is unknown. Please try again later.";
focal_class.type: String
focal_class.var_name: DEFAULT_DESCRIPTION
focal_class.file: model/base/src/main/java/org/eclipse/ditto/model/base/exceptions/SignalEnrichmentFailedException.java
focal_class.identifier: SignalEnrichmentFailedException
focal_class.class_method_signature: SignalEnrichmentFailedException.SignalEnrichmentFailedException(
              final HttpStatusCode statusCode,
              final DittoHeaders dittoHeaders,
              @Nullable final String message,
              @Nullable final String description,
              @Nullable final Throwable cause,
              @Nullable final URI href)
focal_class.full_signature: private  SignalEnrichmentFailedException(
              final HttpStatusCode statusCode,
              final DittoHeaders dittoHeaders,
              @Nullable final String message,
              @Nullable final String description,
              @Nullable final Throwable cause,
              @Nullable final URI href)
focal_class.identifier: SignalEnrichmentFailedException
focal_class.modifiers: private
focal_class.parameters: (
              final HttpStatusCode statusCode,
              final DittoHeaders dittoHeaders,
              @Nullable final String message,
              @Nullable final String description,
              @Nullable final Throwable cause,
              @Nullable final URI href)
focal_class.signature:  SignalEnrichmentFailedException(
              final HttpStatusCode statusCode,
              final DittoHeaders dittoHeaders,
              @Nullable final String message,
              @Nullable final String description,
              @Nullable final Throwable cause,
              @Nullable final URI href)
focal_class.class_method_signature: SignalEnrichmentFailedException.newBuilder()
focal_class.full_signature: public static Builder newBuilder()
focal_class.identifier: newBuilder
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: Builder
focal_class.signature: Builder newBuilder()
focal_class.class_method_signature: SignalEnrichmentFailedException.fromJson(final JsonObject jsonObject,
              final DittoHeaders dittoHeaders)
focal_class.full_signature: public static SignalEnrichmentFailedException 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: SignalEnrichmentFailedException
focal_class.signature: SignalEnrichmentFailedException fromJson(final JsonObject jsonObject,
              final DittoHeaders dittoHeaders)
focal_class.class_method_signature: SignalEnrichmentFailedException.dueTo(final DittoRuntimeException cause)
focal_class.full_signature: public static SignalEnrichmentFailedException dueTo(final DittoRuntimeException cause)
focal_class.identifier: dueTo
focal_class.modifiers: public static
focal_class.parameters: (final DittoRuntimeException cause)
focal_class.return: SignalEnrichmentFailedException
focal_class.signature: SignalEnrichmentFailedException dueTo(final DittoRuntimeException cause)
focal_class.superclass: extends DittoRuntimeException
focal_method.body: public static SignalEnrichmentFailedException dueTo(final DittoRuntimeException cause) {
          return newBuilder()
                  .dueTo(cause)
                  .dittoHeaders(cause.getDittoHeaders())
                  .build();
      }
focal_method.class_method_signature: SignalEnrichmentFailedException.dueTo(final DittoRuntimeException cause)
focal_method.full_signature: public static SignalEnrichmentFailedException dueTo(final DittoRuntimeException cause)
focal_method.identifier: dueTo
focal_method.invocations: build dittoHeaders dueTo newBuilder getDittoHeaders
focal_method.modifiers: public static
focal_method.parameters: (final DittoRuntimeException cause)
focal_method.return: SignalEnrichmentFailedException
focal_method.signature: SignalEnrichmentFailedException dueTo(final DittoRuntimeException cause)