/*
 * Licensed to CRATE Technology GmbH ("Crate") under one or more contributor
 * license agreements.  See the NOTICE file distributed with this work for
 * additional information regarding copyright ownership.  Crate licenses
 * this file to you under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.  You may
 * obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
 * License for the specific language governing permissions and limitations
 * under the License.
 *
 * However, if you have executed another commercial license agreement
 * with Crate these terms will supersede the license and you may use the
 * software solely pursuant to the terms of the relevant commercial agreement.
 */

package io.crate.executor.transport.task;

import io.crate.executor.transport.kill.KillAllRequest;
import io.crate.executor.transport.kill.KillResponse;
import io.crate.executor.transport.kill.TransportKillAllNodeAction;
import io.crate.test.integration.CrateUnitTest;
import org.elasticsearch.action.ActionListener;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;

import java.util.UUID;

import static org.mockito.Mockito.*;

public class KillTaskTest extends CrateUnitTest {

    @Captor
    public ArgumentCaptor<ActionListener<KillResponse>> responseListener;

    private KillTask killTask;
    private KillJobTask killJobsTask;

    @SuppressWarnings("unchecked")
    @Test
    public void testKillTaskCallsBroadcastOnTransportKillAllNodeAction() throws Exception {
        TransportKillAllNodeAction killAllNodeAction = mock(TransportKillAllNodeAction.class);
        KillTask task =  new KillTask(killAllNodeAction, UUID.randomUUID());

        task.start();
        verify(killAllNodeAction, times(1)).broadcast(any(KillAllRequest.class), any(ActionListener.class));
        verify(killAllNodeAction, times(0)).nodeOperation(any(KillAllRequest.class), any(ActionListener.class));
    }
}

@@ -1119,62 +1119,8 @@
 st;%0A
-import io.crate.executor.transport.kill.KillResponse;%0A
 impo
@@ -1183,16 +1183,16 @@
 Action;%0A
+
 import i
@@ -1305,70 +1305,8 @@
 est;
-%0Aimport org.mockito.ArgumentCaptor;%0Aimport org.mockito.Captor;
 %0A%0Aim
@@ -1420,164 +1420,8 @@
  %7B%0A%0A
-    @Captor%0A    public ArgumentCaptor%3CActionListener%3CKillResponse%3E%3E responseListener;%0A%0A    private KillTask killTask;%0A    private KillJobTask killJobsTask;%0A
 %0A   

Remove unused declarations from KillTaskTest