private void testCase2(boolean autoSpawn) throws LockedException,
			DuplicateIDException {
		if (autoSpawn) {
			populateNetwork(5);
		} else {
			if (!locked || processes.size() != 5) {
				System.out
						.println("Test case 2 with autoSpawn turned off expects to find a locked network with five processes.");
				throw new RuntimeException();
			}
		}

		try {
			processes.get(1)
					.sendMessage(Constants.BROADCAST, "First broadcast");
			synchronized (queue) {
				for (int i = queue.size() - 1; i >= 0; i--) {
					if (queue.get(i).recipient != 5) {
						forwardMessage(i);
					}
				}
			}
			processes.get(2).sendMessage(Constants.BROADCAST,
					"Second broadcast");
			synchronized (queue) {
				for (int i = queue.size() - 1; i > 0; i--) {
					forwardMessage(i);
				}
			}
			processes.get(3)
					.sendMessage(Constants.BROADCAST, "Third broadcast");
			synchronized (queue) {
				for (int i = queue.size() - 1; i > 0; i--) {
					forwardMessage(i);
				}
			}
			processes.get(4).sendMessage(Constants.BROADCAST,
					"Fourth broadcast");
			synchronized (queue) {
				for (int i = queue.size() - 1; i > 0; i--) {
					forwardMessage(i);
				}
			}

			forwardMessage(0);
		} catch (RemoteException e) {
			e.printStackTrace(System.out);
		}
	}