@Test
	public void testRemoveInnerVsAddOuterWithOtherAfterInner() throws Exception {

		final CategoryPath rootPath = new CategoryPath("/");

		/*
		 * 	Original  (Create inner structure)
		 * 		inner
		 * 			byte
		 * 			word
		 * 
		 * 	Latest  (Remove inner)
		 * 
		 * 	My  (Create outer containing inner as 2nd component. Change inner.
		 * 	     Add new structure other so it comes later in struct than inner.)
		 * 		outer
		 * 			byte
		 * 			inner
		 * 				byte
		 * 				word
		 * 			float
		 * 			other
		 * 				byte
		 * 				void *
		 * 			byte
		 */

		mtf.initialize("notepad", new OriginalProgramModifierListener() {

			@Override
			public void modifyOriginal(ProgramDB program) throws Exception {
				DataTypeManager dtm = program.getDataTypeManager();

				Structure inner = new StructureDataType("inner", 0);
				inner.add(new ByteDataType());
				inner.add(new WordDataType());
				inner.setPackingEnabled(true);

				Category rootCategory = dtm.getCategory(rootPath);
				rootCategory.addDataType(inner, null);

				inner = (Structure) dtm.getDataType(rootPath, "inner");
				assertNotNull(inner);
			}

			@Override
			public void modifyLatest(ProgramDB program) throws Exception {
				DataTypeManager dtm = program.getDataTypeManager();
				Structure inner = (Structure) dtm.getDataType(rootPath, "inner");

				// Remove inner struct
				dtm.remove(inner);
			}

			@Override
			public void modifyPrivate(ProgramDB program) throws Exception {
				DataTypeManager dtm = program.getDataTypeManager();
				Structure inner = (Structure) dtm.getDataType(rootPath, "inner");

				Structure other = new StructureDataType("other", 0);
				other.add(new ByteDataType());
				other.add(new PointerDataType(new VoidDataType()));
				other.setPackingEnabled(true);

				Structure outer = new StructureDataType("outer", 0);
				outer.add(new ByteDataType());
				outer.add(inner);
				outer.add(new FloatDataType());
				outer.add(other);
				outer.add(new ByteDataType());
				outer.setPackingEnabled(true);

				// Add outer struct
				dtm.addDataType(outer, DataTypeConflictHandler.DEFAULT_HANDLER);
			}
		});

		executeMerge();

		dismissUnresolvedDataTypesPopup();

		waitForCompletion();

		DataTypeManager dtm = resultProgram.getDataTypeManager();

		StructureInternal inner = (StructureInternal) dtm.getDataType(rootPath, "inner");
		assertNull(inner);

		StructureInternal other = (StructureInternal) dtm.getDataType(rootPath, "other");
		assertNotNull(other);
		//@formatter:off
		assertEquals("/other\n" + 
			"pack()\n" + 
			"Structure other {\n" + 
			"   0   byte   1      \"\"\n" + 
			"   4   void *   4      \"\"\n" + 
			"}\n" + 
			"Length: 8 Alignment: 4\n", other.toString());
		//@formatter:on

		StructureInternal outer = (StructureInternal) dtm.getDataType(rootPath, "outer");
		assertNotNull(outer);
		//@formatter:off
		assertEquals("/outer\n" + 
			"pack()\n" + 
			"Structure outer {\n" + 
			"   0   byte   1      \"\"\n" + 
			"   1   -BAD-   4      \"Failed to apply 'inner'\"\n" + 
			"   8   float   4      \"\"\n" + 
			"   12   other   8      \"\"\n" + 
			"   20   byte   1      \"\"\n" + 
			"}\n" + 
			"Length: 24 Alignment: 4\n", outer.toString());
		//@formatter:on
	}
Data type merge tests with fixup for data types added in My program.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/merge/datatypes/DataTypeMergeFixupTest.java