@Test
	public void testOffcutReferenceIntoArray() throws Exception {
//		openEmptyNotepad();

		StructureDataType structure = new StructureDataType("structure", 0);
		structure.add(IntegerDataType.dataType, "field1", "Comment 1");
		structure.add(IntegerDataType.dataType, "field2", "Comment 2");
		structure.add(IntegerDataType.dataType, "field3", "Comment 3");

		Address arrayAddr = addr("01001888");
		Command<Program> cmd = new CreateArrayCmd(arrayAddr, 3, structure, 12);
		applyCmd(program, cmd);

		String arrayName = "ArrayOfStructures";
		cmd = new AddLabelCmd(arrayAddr, arrayName, SourceType.USER_DEFINED);
		applyCmd(program, cmd);

		String operandAddressString = "1006440";
		Address operandAddr = addr(operandAddressString);
		cmd = new AddMemRefCmd(addr(operandAddressString), addr("010018a0"),
			SourceType.USER_DEFINED, 0, true);
		applyCmd(program, cmd);

		//
		// We should expect the operand field to use the dynamic label of the array, which is
		// generated by the reference.  It should look something like:
		//     ArrayOfStructures[2].field1
		//
		assertTrue(cb.goToField(operandAddr, OperandFieldFactory.FIELD_NAME, 0, 1));
		ListingTextField tf = (ListingTextField) cb.getCurrentField();
		assertEquals(arrayName + "[2].field1", tf.getText());
	}
Tests that offcut references into arrays are painted as offsets into the array and not
as simply an offset from the min address.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/util/viewer/field/OperandFieldFactoryTest.java