@Test
	public void testInterrupt() {
		Thread testThread = new Thread(pipelinedFDstage); //A thread running through pipelined FDstage.
		testThread.start(); //Start the thread, which runs until interrupted (execute stage is responsible for terminating
		Instruction instr;
		int instructionFetchCount = 0; //Record number of instructions fetched
		for (int i = 0; i < 5; i++) { //Allow 5 of the 10 instructions in the file to be fetched
			try {
				instr = testFetchToExecuteQueue.take(); //This thread must take from the queue to enable the f/d stage to continue
				//running; the f/d stage thread waits until another thread (in this case this thread) takes the opcode before fetching
				//the next instruction.
				System.out.println(instr);
				instructionFetchCount++;
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} 
		}
		testThread.interrupt();
		while(testThread.isAlive()); //The assertEquals statement will never be reached and the test will fail if the thread
									//doesn't terminate (which doesn't happen straight away but the thread should be directed
									//to stop fetching and return from the run() method upon discovery of an interrupt).
		
		assertEquals(5, instructionFetchCount); //Only 5 instructions should have been fetched; after that point, an interrupt
		//was issued and this should halt activity.
		
	}