### Question:
GameController implements Runnable, GameListener { public GameController(ServerLobby lobby, GameType gameType) { this.lobby = lobby; controlPairs = new ArrayList<ControlPair>(); spectators = new ArrayList<UserProxy>(); terminateFlag = false; generateGameModel(gameType); } GameController(ServerLobby lobby, GameType gameType); void addPlayer(UserProxy player, RobotProxy robot); void addSpectator(UserProxy player); boolean isPlayer(UserProxy player); boolean isSpectator(UserProxy spectator); boolean isActiveRobot(RobotProxy robot); synchronized RobotProxy getPairedRobot(UserProxy player); @Override /** * Main loop of GameController (performs real-time physics updates on GameModel) */ void run(); void triggerTermination(); synchronized boolean isTerminating(); void processInput(UserProxy player, Vector<Float> orientation, String buttons); RobotCommand generateCommand(Vector<Float> orientation, String buttons, 
			ControlType controlType); void updateRobotPosition(RobotProxy robot, Posture newPosture); GameModel getGameModel(); void gameStateChanged(GameEvent event); static final float PITCH_SCALING_FACTOR; static final float ROLL_SCALING_FACTOR; static final float DOT_SPACING; static final int COLS; static final float STOP_THRESHOLD; }### Answer:
@Test public void testGameController() { testController = new GameController(testLobby, GameType.FREETEST); assertEquals(GameType.FREETEST, testController.getGameModel().getGameType()); testController = new GameController(testLobby, GameType.TANK_SIMULATION); assertEquals(GameType.TANK_SIMULATION, testController.getGameModel().getGameType()); testController = new GameController(testLobby, GameType.LIGHTCYCLES); assertEquals(GameType.LIGHTCYCLES, testController.getGameModel().getGameType()); }