@Test
public void testAddUserProxy() {

	ArrayList<TestUserProxy> testUsers = new ArrayList<TestUserProxy>();
	for(int i = 0; i < TEST_MAX_PLAYERS + 1; i++) {
		TestUserProxy testUser = new TestUserProxy(testLobby,
				"TestUser" + Integer.toString(i));
		testUsers.add(testUser);
	}
	
	// Test valid additions
	for(int i = 0; i < TEST_MAX_PLAYERS; i++) {
		testLobby.addUserProxy(testUsers.get(i));
		assertEquals(testUsers.get(i).getUser(), 
				testListener.getLastUserEvent().getUser());
		assertEquals(ServerLobbyEvent.EVENT_PLAYER_JOINED,
				testListener.getLastUserEvent().getEventType());
	}
	
	// Test addition over maximum and null addition
	testListener.clearNumEvents();
	assertEquals(false, testLobby.addUserProxy(testUsers.get(TEST_MAX_PLAYERS)));
	assertEquals(false, testLobby.addUserProxy(null));
	assertEquals(0, testListener.getNumEvents());
	
	while(!testUsers.isEmpty()) {
		TestUserProxy testUser = testUsers.remove(0);
		testLobby.removeUserProxy(testUser);
		testUser = null;
	}
}