### Question:
PlayerServiceImpl implements PlayerService { @Override public Joystick getJoystick(String id) { lock.writeLock().lock(); try { return playerGames.get(id).getGame().getJoystick(); } finally { lock.writeLock().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 shouldGetJoystick() { createPlayer(VASYA); Joystick joystick1 = joystick(VASYA); createPlayer(PETYA); Joystick joystick2 = joystick(PETYA); assertSame(joystick1, ((LockedJoystick)playerService.getJoystick(VASYA)).getWrapped()); assertSame(joystick2, ((LockedJoystick)playerService.getJoystick(PETYA)).getWrapped()); assertSame(NullJoystick.INSTANCE, playerService.getJoystick(KATYA)); }