### Question:
ServerLobby { public synchronized void setGameType(GameType newType) { if(newType == null) return; this.selectedGameType = newType; for(ServerLobbyListener listener : listeners) { listener.lobbyGameStateChanged(new LobbyGameEvent(this, LobbyGameEvent.EVENT_GAMETYPE_CHANGE, selectedGameType)); } for(UserProxy userProxy : users) { if(userProxy.getUser().isReady()) { userProxy.getUser().setReady(false); broadcastUserStateUpdate(userProxy); } } } ServerLobby(String serverName, int maxRobots, int maxUsers); synchronized void addLobbyStateListener(ServerLobbyListener listener); synchronized void removeLobbyStateListener(ServerLobbyListener listener); synchronized boolean addUserProxy(UserProxy userProxy); synchronized void removeUserProxy(UserProxy userProxy); synchronized boolean registerRobot(RobotProxy robot); synchronized void unregisterRobot(RobotProxy robot); synchronized void broadcastMessage(String message); synchronized void broadcastUserStateUpdate(UserProxy userProxy); synchronized void setGameType(GameType newType); boolean gameInProgress(); GameController getCurrentGame(); GameType getCurrentGameType(); synchronized RobotProxy getRobotProxy(String identifier); synchronized boolean isUsernameRegistered(String username); String getServerName(); synchronized void launchGame(); synchronized void endCurrentGame();  }### Answer:
@Test public void testSetGameType() { testLobby.setGameType(GameType.TANK_SIMULATION); assertEquals(GameType.TANK_SIMULATION, testLobby.getCurrentGameType()); testLobby.setGameType(GameType.LIGHTCYCLES); assertEquals(GameType.LIGHTCYCLES, testLobby.getCurrentGameType()); testLobby.setGameType(null); assertEquals(GameType.LIGHTCYCLES, testLobby.getCurrentGameType()); }