### Question:
PlayerServiceImpl implements PlayerService { @Override public Player get(String id) { lock.readLock().lock(); try { return getPlayer(id); } finally { lock.readLock().unlock(); } }  @PostConstruct void init(); @Override Player register(String id, String ip, String roomName, String gameName); @Override void reloadAI(String id); @Override Player register(PlayerSave save); @Override void tick(); @Override List<Player> getAll(); @Override List<Player> getAll(String gameName); @Override void remove(String id); @Override void updateAll(List<PlayerInfo> players); @Override void update(Player player); @Override // TODO test me void loadSaveForAll(String gameName, String newSave); @Override boolean contains(String id); @Override Player get(String id); @Override void removeAll(); @Override void removeAll(String roomName); @Override Joystick getJoystick(String id); @Override void closeRegistration(); @Override boolean isRegistrationOpened(); @Override void openRegistration(); @Override void cleanAllScores(); @Override void cleanAllScores(String roomName); @Override void reloadAllRooms(); @Override void reloadAllRooms(String roomName); @Override Player getRandom(String gameType); @Override GameType getAnyGameWithPlayers();  }### Answer:
@Test public void shouldCreatePlayer() { createPlayer(VASYA); Player player = playerService.get(VASYA); assertEquals("game", player.getGameName()); assertEquals(VASYA, player.getId()); assertNull(player.getPassword()); assertNull(player.getCode()); assertEquals(VASYA_URL, player.getCallbackUrl()); assertSame(gameType, player.getGameType()); assertNull(player.getMessage()); assertEquals(0, player.getScore()); }
@Test public void shouldFindPlayer_whenGet() { Player newPlayer = createPlayer(VASYA); Player player = playerService.get(VASYA); assertSame(newPlayer, player); }
@Test public void shouldGetNullPlayer_whenGetByNotExistsIp() { createPlayer(VASYA); Player player = playerService.get(KATYA); assertEquals(NullPlayer.class, player.getClass()); }