@@ -0,0 +1,2351 @@
+/*%0A * Copyright 2020, TeamDev. All rights reserved.%0A *%0A * Redistribution and use in source and/or binary forms, with or without%0A * modification, must retain the above copyright notice and the following%0A * disclaimer.%0A *%0A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS%0A * %22AS IS%22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT%0A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR%0A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT%0A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,%0A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT%0A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,%0A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY%0A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT%0A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE%0A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.%0A */%0A%0Apackage io.spine.core;%0A%0Aimport io.spine.server.event.EventFactory;%0Aimport io.spine.server.type.EventEnvelope;%0Aimport io.spine.server.type.given.GivenEvent;%0Aimport io.spine.testing.core.given.GivenUserId;%0Aimport org.junit.jupiter.api.DisplayName;%0Aimport org.junit.jupiter.api.Test;%0A%0Aimport static com.google.common.truth.Truth.assertThat;%0Aimport static io.spine.protobuf.AnyPacker.pack;%0Aimport static io.spine.server.event.EventFactory.on;%0A%0A/**%0A * Extra tests for %7B@link Signal%7Ds.%0A *%0A * %3Cp%3EThe main test suite for %7B@code Signal%7Ds is located in the %7B@code core%7D module. This test suite%0A * only hosts tests which rely on the components from the %7B@code server%7D module.%0A */%0A@DisplayName(%22%60Signal%60 also should%22)%0Aclass SignalTest %7B%0A%0A    @Test%0A    @DisplayName(%22produce correct origin%22)%0A    void produceOrigin() %7B%0A        Event originalEvent = GivenEvent.arbitrary();%0A        UserId producerEntityId = GivenUserId.generated();%0A        EventFactory factory = on(EventEnvelope.of(originalEvent), pack(producerEntityId));%0A        Event derivativeEvent = factory.createEvent(GivenEvent.message(), null);%0A        Origin origin = derivativeEvent.getContext().getPastMessage();%0A        assertThat(origin.getMessage())%0A                .isEqualTo(originalEvent.messageId());%0A        assertThat(origin.hasGrandOrigin())%0A                .isFalse();%0A    %7D%0A%7D%0A

Add a test for message origins