/*
 * Copyright 2018, 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.delivery.given;

import com.google.protobuf.Empty;
import io.spine.core.Subscribe;
import io.spine.server.delivery.SystemEventWatcher;
import io.spine.system.server.EntityCreated;
import io.spine.test.delivery.SewProjectCreated;
import io.spine.type.TypeUrl;

import static org.junit.jupiter.api.Assertions.fail;

public class SystemEventWatcherTestEnv {

    /**
     * Prevents the utility class instantiation.
     */
    private SystemEventWatcherTestEnv() {
    }

    public static class ExternalWatcher extends SystemEventWatcher {

        public ExternalWatcher() {
            super(TypeUrl.of(Empty.class));
        }

        @Subscribe(external = true)
        public void on(SewProjectCreated domesticEvent) {
            fail("External events are not allowed in SystemEventWatchers.");
        }
    }

    public static class NonSystemWatcher extends SystemEventWatcher {

        public NonSystemWatcher() {
            super(TypeUrl.of(Empty.class));
        }

        @Subscribe
        public void on(SewProjectCreated externalEvent) {
            fail("Only spine.system.server events are allowed.");
        }
    }

    public static class ValidSystemWatcher extends SystemEventWatcher {

        public ValidSystemWatcher() {
            super(TypeUrl.of(Empty.class));
        }

        @Subscribe
        public void on(EntityCreated externalEvent) {
            // NoOp.
        }
    }
}

@@ -1711,32 +1711,60 @@
  public void on(
+@SuppressWarnings(%22unused%22) 
 SewProjectCreate
@@ -1769,21 +1769,15 @@
 ted 
-domesticEvent
+ignored
 ) %7B%0A
@@ -2074,16 +2074,44 @@
 void on(
+@SuppressWarnings(%22unused%22) 
 SewProje
@@ -2116,37 +2116,31 @@
 jectCreated 
-externalEvent
+ignored
 ) %7B%0A        
@@ -2422,16 +2422,44 @@
 void on(
+@SuppressWarnings(%22unused%22) 
 EntityCr
@@ -2468,21 +2468,14 @@
 ted 
-externalEvent
+unused
 ) %7B%0A

Annotate unused params