@@ -0,0 +1,1764 @@
+/*%0A * Copyright 2019 MovingBlocks%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage org.destinationsol.game.console.commands;%0A%0Aimport org.destinationsol.game.Console;%0Aimport org.destinationsol.game.Hero;%0Aimport org.destinationsol.game.SolGame;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.mockito.Mock;%0Aimport org.mockito.Mockito;%0A%0Aimport static org.junit.Assert.*;%0A%0Apublic class RespawnCommandHandlerTest %7B%0A%0A    private RespawnCommandHandler commandHandler;%0A    private SolGame game;%0A    private Hero hero;%0A    private Console console;%0A%0A    @Before%0A    public void init() %7B%0A        game = Mockito.mock(SolGame.class);%0A        hero = Mockito.mock(Hero.class);%0A        commandHandler = new RespawnCommandHandler(hero, game);%0A        console = Mockito.mock(Console.class);%0A    %7D%0A%0A    @Test%0A    public void shouldRespawnWhenDead() %7B%0A        Mockito.when(hero.isAlive()).thenReturn(false);%0A        commandHandler.handle(%22respawn%22, console);%0A        Mockito.verify(game, Mockito.times(1)).respawn();%0A    %7D%0A%0A    @Test%0A    public void shouldNotRespawnWhenAlive() %7B%0A        Mockito.when(hero.isAlive()).thenReturn(true);%0A        commandHandler.handle(%22respawn%22, console);%0A        Mockito.verify(game, Mockito.never()).respawn();%0A    %7D%0A%7D%0A

Create unit test for 'respawn' command