@Test
	public void testFallthroughOverrideBranchToInstNext() throws AddressFormatException {
		//verify the instructions needed for the test
		Address indirectCallAddr = defaultSpace.getAddress(INDIRECT_JUMP_100002);
		Instruction indirectJump = program.getListing().getInstructionAt(indirectCallAddr);
		assertNotNull(indirectJump);
		assertEquals("breq r0", indirectJump.toString());

		Address addAddr = defaultSpace.getAddress(ADD_R0_R0_100004);
		Instruction add = program.getListing().getInstructionAt(addAddr);
		assertNotNull(add);
		assertEquals("add r0,r0", add.toString());
		Address subAddr = defaultSpace.getAddress(SUB_R0_R0_100006);
		Instruction sub = program.getListing().getInstructionAt(subAddr);
		assertNotNull(sub);
		assertEquals("sub r0,r0", sub.toString());

		//verify that requesting overrides when there are none is the same as not 
		//requesting overrides
		assertTrue(equalPcodeOpArrays(indirectJump.getPcode(true), indirectJump.getPcode(false)));

		/*
		 * verify that the fallthrough override: 
		 * 1) changes the destination of the CBRANCH op (which is from a goto inst_next) 
		 * 2) appends a BRANCH op with destination subAddr to the pcode for breq r0
		 * 3) makes no other changes
		*/
		PcodeOp[] unmodified = indirectJump.getPcode(false);
		assertTrue(unmodified.length == 3);
		assertTrue(unmodified[0].getOpcode() == PcodeOp.BOOL_NEGATE);  //negate condition
		assertTrue(unmodified[1].getOpcode() == PcodeOp.CBRANCH);      //CBRANCH to inst_next  
		assertTrue(unmodified[2].getOpcode() == PcodeOp.BRANCHIND);    //BRANCHIND r0

		//apply a fallthrough override
		int tid = program.startTransaction("test");
		indirectJump.setFallThrough(subAddr);
		program.endTransaction(tid, true);

		//verify that nothing changes if no overrides are requested
		assertTrue(equalPcodeOpArrays(unmodified, indirectJump.getPcode(false)));
		assertTrue(equalPcodeOpArrays(unmodified, indirectJump.getPcode()));

		PcodeOp[] overridden = indirectJump.getPcode(true);
		assertTrue(overridden.length == unmodified.length + 1);

		//shouldn't change first op 
		assertTrue(equalPcodeOps(overridden[0], unmodified[0]));

		//second op (CBRANCH to inst_next) needs destination updated
		PcodeOp unmodifiedCbranch = unmodified[1];
		PcodeOp modifiedCbranch = overridden[1];
		assertNull(unmodifiedCbranch.getOutput());
		assertNull(modifiedCbranch.getOutput());
		assertTrue(unmodifiedCbranch.getOpcode() == modifiedCbranch.getOpcode());
		assertTrue(unmodifiedCbranch.getNumInputs() == 2);
		assertTrue(modifiedCbranch.getNumInputs() == 2);
		assertTrue(unmodifiedCbranch.getInput(0).isAddress());
		assertTrue(unmodifiedCbranch.getInput(0).getOffset() == addAddr.getOffset());
		assertTrue(modifiedCbranch.getInput(0).isAddress());
		assertTrue(modifiedCbranch.getInput(0).getOffset() == subAddr.getOffset()); //updated dest
		assertEquals(unmodifiedCbranch.getInput(1), modifiedCbranch.getInput(1));

		//shouldn't change third op
		assertTrue(equalPcodeOps(overridden[2], unmodified[2]));

		//verify appended branch
		PcodeOp appendedBranch = overridden[3];
		assertNull(appendedBranch.getOutput());
		assertTrue(appendedBranch.getOpcode() == PcodeOp.BRANCH);
		assertTrue(appendedBranch.getNumInputs() == 1);
		assertTrue(appendedBranch.getInput(0).isAddress());
		assertTrue(appendedBranch.getInput(0).getOffset() == subAddr.getOffset());
	}
Tests that a fallthrough override modifies branches to the next instruction
(e.g., from a {@code goto inst_next;}
@throws AddressFormatException if {@code AddressSpace.getAddress} throws it
Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/program/model/pcode/PcodeEmitContextTest.java