/*
 * Copyright 2019, TeamDev. All rights reserved.
 *
 * Redistribution and use in source and/or binary forms, with or without
 * modification, must retain the above copyright notice and the following
 * disclaimer.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

package io.spine.server.model.declare.given;

import com.google.common.collect.ImmutableList;
import io.spine.test.event.ProjectCreated;

import java.util.List;

public final class ReturnTypeAnalyzerTestEnv {

    /** Prevents instantiation of this test environment class. */
    private ReturnTypeAnalyzerTestEnv() {
    }

    public static class MethodContainer {

        public List<ProjectCreated> returnList() {
            return ImmutableList.of();
        }
    }
}

@@ -1120,57 +1120,279 @@
 ine.
-test.event.ProjectCreated;%0A%0Aimport java.util.List
+base.Identifier;%0Aimport io.spine.server.tuple.Pair;%0Aimport io.spine.test.core.TaskAssigned;%0Aimport io.spine.test.event.ProjectCreated;%0Aimport io.spine.test.event.ProjectId;%0A%0Aimport java.util.List;%0Aimport java.util.Optional;%0A%0Aimport static io.spine.base.Identifier.newUuid
 ;%0A%0Ap
@@ -1695,16 +1695,402 @@
        %7D
+%0A%0A        public Pair%3CProjectCreated, Optional%3CTaskAssigned%3E%3E returnPair() %7B%0A            ProjectId projectId = Identifier.generate(ProjectId.class);%0A            ProjectCreated projectCreated = ProjectCreated%0A                    .newBuilder()%0A                    .setProjectId(projectId)%0A                    .build();%0A            return Pair.withNullable(projectCreated, null);%0A        %7D
 %0A    %7D%0A%7D

Add method returning `Pair` to test env