SignalEnrichmentFailedException extends DittoRuntimeException { public static SignalEnrichmentFailedException dueTo(final DittoRuntimeException cause) { return newBuilder() .dueTo(cause) .dittoHeaders(cause.getDittoHeaders()) .build(); } private  SignalEnrichmentFailedException(
            final HttpStatusCode statusCode,
            final DittoHeaders dittoHeaders,
            @Nullable final String message,
            @Nullable final String description,
            @Nullable final Throwable cause,
            @Nullable final URI href); static Builder newBuilder(); static SignalEnrichmentFailedException fromJson(final JsonObject jsonObject,
            final DittoHeaders dittoHeaders); static SignalEnrichmentFailedException dueTo(final DittoRuntimeException cause); static final String ERROR_CODE; }
@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-----")); }