@Test
public void correlationIdIsUnchanged() {

    // GIVEN: cursor and command have different correlation IDs
    final ThingsSearchCursor underTest = randomCursor();
    final String correlationIdFromCommand = "queryThingsCorrelationId";
    final QueryThings queryThings =
            withCursor(QueryThings.of(DittoHeaders.newBuilder().correlationId(correlationIdFromCommand).build()),
                    underTest);
    // WHEN: command is adjusted by cursor
    final String correlationIdOfAdjustedCommand =
            ThingsSearchCursor.adjust(Optional.of(underTest), queryThings)
                    .getDittoHeaders()
                    .getCorrelationId()
                    .orElse(null);
    // THEN: correlation ID of adjusted command is identical to the command's correlation ID
    assertThat(correlationIdOfAdjustedCommand).isEqualTo(correlationIdFromCommand);
    assertThat(correlationIdOfAdjustedCommand).isNotEqualTo(getCorrelationId(underTest));
}