@Test public void onPlayerDeath() { GamePlayerStorage<? super GamePlayer> storage = mock(GamePlayerStorage.class); Respawn respawn = mock(Respawn.class); RespawnDeathHandler respawnDeathHandler = new RespawnDeathHandler(respawn, storage); UUID uuid = UUID.randomUUID(); GamePlayer gamePlayer = mock(GamePlayer.class); when(storage.getPlayer(eq(uuid))).thenReturn(gamePlayer); respawnDeathHandler.onPlayerDeath(uuid); verify(respawn).markForRespawn(eq(gamePlayer)); }
@Override public void onPlayerDeath(UUID uuid) { this.respawn.markForRespawn(gamePlayerStorage.getPlayer(uuid)); }
RespawnDeathHandler implements PlayerDeathHandler { @Override public void onPlayerDeath(UUID uuid) { this.respawn.markForRespawn(gamePlayerStorage.getPlayer(uuid)); } }
RespawnDeathHandler implements PlayerDeathHandler { @Override public void onPlayerDeath(UUID uuid) { this.respawn.markForRespawn(gamePlayerStorage.getPlayer(uuid)); }  }
RespawnDeathHandler implements PlayerDeathHandler { @Override public void onPlayerDeath(UUID uuid) { this.respawn.markForRespawn(gamePlayerStorage.getPlayer(uuid)); }  @Override void onPlayerDeath(UUID uuid); }
RespawnDeathHandler implements PlayerDeathHandler { @Override public void onPlayerDeath(UUID uuid) { this.respawn.markForRespawn(gamePlayerStorage.getPlayer(uuid)); }  @Override void onPlayerDeath(UUID uuid);  }