AcknowledgementRequestDuplicateCorrelationIdException extends DittoRuntimeException implements AcknowledgementException { public static AcknowledgementRequestDuplicateCorrelationIdException.Builder newBuilder(final String correlationId) { return new AcknowledgementRequestDuplicateCorrelationIdException.Builder(correlationId); } private  AcknowledgementRequestDuplicateCorrelationIdException(final DittoHeaders dittoHeaders,
            @Nullable final String message,
            @Nullable final String description,
            @Nullable final Throwable cause,
            @Nullable final URI href); static AcknowledgementRequestDuplicateCorrelationIdException.Builder newBuilder(final String correlationId); static AcknowledgementRequestDuplicateCorrelationIdException fromJson(final JsonObject jsonObject,
            final DittoHeaders dittoHeaders); static final String ERROR_CODE; }
@Test public void toJsonReturnsExpected() { final DittoHeaders dittoHeaders = DittoHeaders.newBuilder().correlationId(KNOWN_CORRELATION_ID).build(); final AcknowledgementRequestDuplicateCorrelationIdException underTest = AcknowledgementRequestDuplicateCorrelationIdException.newBuilder(KNOWN_CORRELATION_ID) .dittoHeaders(dittoHeaders).build(); final JsonObject actual = underTest.toJson(); assertThat(actual).isEqualTo(KNOWN_JSON_REPRESENTATION); }