*/
	@Test
	public void testNormPopupTwoGlassFirstNeedDrilling() throws InterruptedException {
		testGlass1 = new Glass(new Recipe(false, false, false, false, true, false, false, false, false, false));
		testGlass2 = new Glass(new Recipe());
		
		// Set initial state
		popup.setGlassLoaded(false);
		popup.setPopupRaised(false);
		
		// Conveyor messaging to see if popup is clear or not
		popup.msgIsPopupClear();
		
		// Popup should check itself and robots to see if it's loaded or otherwise got its hands full
		popup.pickAndExecuteAnAction();
		
		assertTrue(
				"Mock Conveyor should have received that the popup is ready for the first glass. Event log: "
						+ getLogs(), conveyor.log
						.containsString("Received message msgPopupClear"));
		assertTrue("Mock Conveyor should have received 1 message."
				+ getLogs(), conveyor.log.size() == 1);
		
		popup.msgGlassOnPopup(testGlass1);
		
		// Popup should not do anything since it's waiting for transducer to send a popup load finished event
		popup.pickAndExecuteAnAction();
		
		Thread.sleep(100);
		
		assertTrue("Transducer should have received 0 messages."
						+ getLogs(), transducerLog.size() == 0);
		transducerLog.clear();
		
		//Fire necessary event and clear it from log
		Integer[] args = new Integer[1];
		args[0] = 0;
		myTransducer.fireEvent(TChannel.POPUP, TEvent.POPUP_GUI_LOAD_FINISHED, args);
		
		Thread.sleep(100);
		transducerLog.clear();
		
		// Conveyor messaging to see if popup is clear or not for second glass
		popup.msgIsPopupClear();
		
		popup.releasePopupSemaphore();
		
		// Popup should ignore this message for now and should check the glass to see that it does need processing
		popup.pickAndExecuteAnAction();
		
		Thread.sleep(100);
		
		assertTrue(
				"Transducer should have received a popup move up event. Event log: "
						+ getLogs(), transducerLog
						.containsString("Received fired event: POPUP_DO_MOVE_UP"));
		assertTrue("Transducer should have only received 1 message."
						+ getLogs(), transducerLog.size() == 1);
		transducerLog.clear();
		
		//Fire necessary event and clear it from log
		args = new Integer[1];
		args[0] = 0;
		myTransducer.fireEvent(TChannel.POPUP, TEvent.POPUP_GUI_MOVED_UP, args);
		
		Thread.sleep(100);
		transducerLog.clear();
		
		// Popup should ask for pickup of glass
		popup.pickAndExecuteAnAction();
		
		assertTrue(
				"Mock Robot 1 should have received a pickup request message. Event log: "
						+ getLogs(), robots.get(0).log
						.containsString("Received message msgRobotPickup"));
		assertTrue(
				"The glass should have the same state as before. Event log: "
						+ getLogs(), robots.get(0).log
						.containsString("glass state is start"));
		assertTrue(
				"The glass should need drilling according to recipe. Event log: "
						+ getLogs(), robots.get(0).log
						.containsString("needDrilling true"));
		assertTrue("Robot should have only received 1 message."
						+ getLogs(), robots.get(0).log.size() == 1);
		
		// Checks robots
		popup.pickAndExecuteAnAction();
		
		popup.releasePopupSemaphore();
		
		// Since there is second piece of glass inbound the popup should ready itself to receive the next glass
		popup.pickAndExecuteAnAction();
		
		Thread.sleep(100);
		
		assertTrue(
				"Transducer should have received a popup move down event. Event log: "
						+ getLogs(), transducerLog
						.containsString("Received fired event: POPUP_DO_MOVE_DOWN"));
		assertTrue("Transducer should have only received 1 message."
						+ getLogs(), transducerLog.size() == 1);
		transducerLog.clear();
		
		//Fire necessary event and clear it from log
		args = new Integer[1];
		args[0] = 0;
		myTransducer.fireEvent(TChannel.POPUP, TEvent.POPUP_GUI_MOVED_DOWN, args);
		
		Thread.sleep(100);
		transducerLog.clear();
		
		// Popup should sense it's in the position to receive the second glass
		popup.pickAndExecuteAnAction();
		
		assertTrue(
				"Mock Conveyor should have received that the popup is ready for the second glass. Event log: "
						+ getLogs(), conveyor.log
						.containsString("Received message msgPopupClear"));
		assertTrue("Mock Conveyor should have received 2 message."
				+ getLogs(), conveyor.log.size() == 2);
		
		popup.msgGlassOnPopup(testGlass2);
		
		// Popup is waiting for the glass to be loaded on the popup so there should be no new messages/fired events
		popup.pickAndExecuteAnAction();
		
		Thread.sleep(100);
		
		assertTrue("Transducer should have received 0 messages."
						+ getLogs(), transducerLog.size() == 0);
		transducerLog.clear();
		assertTrue("Robot should have only received 1 message."
				+ getLogs(), robots.get(0).log.size() == 1);
		assertTrue("Mock Conveyor should have received 2 messages."
				+ getLogs(), conveyor.log.size() == 2);
		assertTrue("Mock Conveyor Family should have received 0 messages."
				+ getLogs(), nextConveyorFamily.log.size() == 0);
		
		//Fire necessary event and clear it from log
		args = new Integer[1];
		args[0] = 0;
		myTransducer.fireEvent(TChannel.POPUP, TEvent.POPUP_GUI_LOAD_FINISHED, args);
		
		Thread.sleep(100);
		transducerLog.clear();
		
		popup.msgWantToDropOffGlass(robots.get(0));
		
		//Popup should ignore robot message for now and see that second glass doesn't need processing
		popup.pickAndExecuteAnAction();
		
		popup.releasePopupSemaphore();
		
		// Popup should prepare to release glass
		popup.pickAndExecuteAnAction();
		
		Thread.sleep(100);
		
		assertTrue(
				"Transducer should have received a popup move down event. Event log: "
						+ getLogs(), transducerLog
						.containsString("Received fired event: POPUP_DO_MOVE_DOWN"));
		assertTrue("Transducer should have only received 1 message."
						+ getLogs(), transducerLog.size() == 1);
		transducerLog.clear();
		
		//Fire necessary event and clear it from log
		args = new Integer[1];
		args[0] = 0;
		myTransducer.fireEvent(TChannel.POPUP, TEvent.POPUP_GUI_MOVED_DOWN, args);
		
		Thread.sleep(100);
		transducerLog.clear();
		
		popup.releaseGlassSemaphore();
		
		popup.pickAndExecuteAnAction();
		
		Thread.sleep(100);
		
		assertTrue(
				"Transducer should have received a popup release glass event. Event log: "
						+ getLogs(), transducerLog
						.containsString("Received fired event: POPUP_RELEASE_GLASS"));
		assertTrue("Transducer should have only received 1 message."
						+ getLogs(), transducerLog.size() == 1);
		transducerLog.clear();
		assertTrue(
				"Mock Conveyor Family should have received the second finished glass. Event log: "
						+ getLogs(), nextConveyorFamily.log
						.containsString("Received message msgHereIsGlass"));
		assertTrue("Mock Conveyor Family should have only received 1 message."
						+ getLogs(), nextConveyorFamily.log.size() == 1);
		assertTrue(
				"The glass should have the same state as before. Event log: "
						+ getLogs(), nextConveyorFamily.log
						.containsString("glass state is start"));
		assertTrue(
				"The glass should not need drilling according to recipe. Event log: "
						+ getLogs(), nextConveyorFamily.log
						.containsString("needDrilling false"));
		
		// Popup is waiting for the glass to be moved off the popup so there should be no new messages/fired events
		popup.pickAndExecuteAnAction();
		
		Thread.sleep(100);
		
		assertTrue("Transducer should have received 0 messages."
						+ getLogs(), transducerLog.size() == 0);
		transducerLog.clear();
		assertTrue("Robot should have only received 1 message."
				+ getLogs(), robots.get(0).log.size() == 1);
		assertTrue("Mock Conveyor should have received 2 message."
				+ getLogs(), conveyor.log.size() == 2);
		assertTrue("Mock Conveyor Family should have received 1 message."
				+ getLogs(), nextConveyorFamily.log.size() == 1);
		
		// Popup is waiting for the glass to be moved off the popup so there should be no new messages/fired events
		popup.pickAndExecuteAnAction();
		
		Thread.sleep(100);
		
		assertTrue("Transducer should have received 0 messages."
						+ getLogs(), transducerLog.size() == 0);
		transducerLog.clear();
		assertTrue("Robot should have only received 1 message."
				+ getLogs(), robots.get(0).log.size() == 1);
		assertTrue("Mock Conveyor should have received 2 messages."
				+ getLogs(), conveyor.log.size() == 2);
		assertTrue("Mock Conveyor Family should have received 1 message."
				+ getLogs(), nextConveyorFamily.log.size() == 1);
		
		//Fire necessary event and clear it from log
		args = new Integer[1];
		args[0] = 0;
		myTransducer.fireEvent(TChannel.POPUP, TEvent.POPUP_GUI_RELEASE_FINISHED, args);
		
		Thread.sleep(100);
		transducerLog.clear();
		
		// Popup should check its robots
		popup.pickAndExecuteAnAction();
		
		popup.releasePopupSemaphore();
		
		// Popup prepares itself for the second glass
		popup.pickAndExecuteAnAction();
		
		Thread.sleep(100);
		
		assertTrue(
				"Transducer should have received a popup move up event. Event log: "
						+ getLogs(), transducerLog
						.containsString("Received fired event: POPUP_DO_MOVE_UP"));
		transducerLog.clear();
		
		//Fire necessary event and clear it from log
		args = new Integer[1];
		args[0] = 0;
		myTransducer.fireEvent(TChannel.POPUP, TEvent.POPUP_GUI_MOVED_UP, args);
		
		Thread.sleep(100);
		transducerLog.clear();
		
		popup.releaseRobotSemaphore();
		
		//Popup should send message after its clear to retrieve glass
		popup.pickAndExecuteAnAction();
		
		
		assertTrue(
				"Mock Robot 1 should have received a pickup request message. Event log: "
						+ getLogs(), robots.get(0).log
						.containsString("Received message msgReceiveGlass"));
		assertTrue("Robot should have only received 2 messages."
						+ getLogs(), robots.get(0).log.size() == 2);
		
		testGlass1.setState(GlassState.doneDrilling);
		
		popup.msgDropOffGlass(robots.get(0), testGlass1);
		
		// Popup is waiting for the glass to be loaded on the popup so there should be no new messages/fired events
		popup.pickAndExecuteAnAction();
		
		Thread.sleep(100);
		
		assertTrue("Transducer should have received 0 messages."
						+ getLogs(), transducerLog.size() == 0);
		transducerLog.clear();
		assertTrue("Robot should have only received 2 messages."
				+ getLogs(), robots.get(0).log.size() == 2);
		assertTrue("Mock Conveyor should have received 2 messages."
				+ getLogs(), conveyor.log.size() == 2);
		assertTrue("Mock Conveyor Family should have received 1 message."
				+ getLogs(), nextConveyorFamily.log.size() == 1);
		
		//Fire necessary event and clear it from log
		args = new Integer[1];
		args[0] = 0;
		myTransducer.fireEvent(TChannel.POPUP, TEvent.POPUP_GUI_LOAD_FINISHED, args);
		
		Thread.sleep(100);
		transducerLog.clear();
		
		popup.releasePopupSemaphore();
		
		// Popup should prepare to release glass
		popup.pickAndExecuteAnAction();
		
		Thread.sleep(100);
		
		assertTrue(
				"Transducer should have received a popup move down event. Event log: "
						+ getLogs(), transducerLog
						.containsString("Received fired event: POPUP_DO_MOVE_DOWN"));
		assertTrue("Transducer should have only received 1 message."
						+ getLogs(), transducerLog.size() == 1);
		transducerLog.clear();
		
		//Fire necessary event and clear it from log
		args = new Integer[1];
		args[0] = 0;
		myTransducer.fireEvent(TChannel.POPUP, TEvent.POPUP_GUI_MOVED_DOWN, args);
		
		Thread.sleep(100);
		transducerLog.clear();
		
		popup.pickAndExecuteAnAction();
		
		Thread.sleep(100);

		assertTrue(
				"Transducer should have received a popup release glass event. Event log: "
						+ getLogs(), transducerLog
						.containsString("Received fired event: POPUP_RELEASE_GLASS"));
		assertTrue("Transducer should have only received 1 message."
						+ getLogs(), transducerLog.size() == 1);
		transducerLog.clear();
		assertTrue(
				"Mock Conveyor Family should have received the first finished glass. Event log: "
						+ getLogs(), nextConveyorFamily.log
						.containsString("Received message msgHereIsGlass"));
		assertTrue("Mock Conveyor Family should have only received 2 messages."
						+ getLogs(), nextConveyorFamily.log.size() == 2);
		assertTrue(
				"The glass should need drilling according to recipe. Event log: "
						+ getLogs(), nextConveyorFamily.log
						.containsString("needDrilling true"));
		assertTrue(
				"The glass should have the same state as before. Event log: "
						+ getLogs(), nextConveyorFamily.log
						.containsString("glass state is doneDrilling"));
	}