@Test
public void testRegisterRobot() {

	ArrayList<RobotProxy> testRobots = new ArrayList<RobotProxy>();
	for(int i = 0; i < TEST_MAX_ROBOTS + 1; i++) {
		RobotProxy testRobot = new TestRobotProxy(testLobby, "RegisterRobot" + Integer.toString(i));
		testRobots.add(testRobot);
		// Test valid registration (test proxies call register upon creation)
		if(i < TEST_MAX_ROBOTS) {
			assertEquals(testRobots.get(i), 
					testListener.getLastRobotEvent().getRobot());
			assertEquals(ServerLobbyEvent.EVENT_ROBOT_REGISTERED,
					testListener.getLastRobotEvent().getEventType());
		}
	}
	
	// Test registration over maximum and null registration
	testListener.clearNumEvents();
	assertEquals(false, testLobby.registerRobot(testRobots.get(TEST_MAX_ROBOTS)));
	assertEquals(false, testLobby.registerRobot(null));
	assertEquals(0, testListener.getNumEvents());
	
	while(!testRobots.isEmpty()) {
		RobotProxy testRobot = testRobots.remove(0);
		testLobby.unregisterRobot(testRobot);
		testRobot = null;
	}
}