@Test
	public void testCleanWithExisting3() {

		DataTypeManager dtm = program.getDataTypeManager();
		DataOrganization dataOrganization = dtm.getDataOrganization();

		dtm.resolve(structA, null);

		try (DataTypeCleaner dtCleaner = new DataTypeCleaner(program.getDataTypeManager(), true)) {

			FunctionDefinition funcDef =
				new FunctionDefinitionDataType(new CategoryPath("/Foo"), "Bar");
			Pointer ptr1 = new PointerDataType(structA);
			Pointer ptr2 = new PointerDataType(structC);
			funcDef.setArguments(
				new ParameterDefinition[] { new ParameterDefinitionImpl("P1", ptr1, null) });
			funcDef.setReturnType(ptr2);

			FunctionDefinition cleanFuncDef = (FunctionDefinition) dtCleaner.clean(funcDef);
			Pointer cleanPtr1 = (Pointer) cleanFuncDef.getArguments()[0].getDataType();
			assertTrue(ptr1.isEquivalent(cleanPtr1));
			assertEquals(dataOrganization.getPointerSize(), cleanPtr1.getLength());
			Pointer cleanPtr2 = (Pointer) cleanFuncDef.getReturnType();
			assertFalse(ptr2.isEquivalent(cleanPtr2));
			assertEquals(dataOrganization.getPointerSize(), cleanPtr2.getLength());
			DataType dt = cleanPtr2.getDataType();
			assertTrue(dt instanceof Structure);
			assertEquals(structC.getCategoryPath(), dt.getCategoryPath());
			assertEquals(structC.getName(), dt.getName());
			assertTrue(dt.isNotYetDefined());

		}
	}
/structC
pack()
Structure structC {
   0   char   1   c0   ""
   4   structB   12   c1   ""
}
Size = 16   Actual Alignment = 4
Ghidra/Test/IntegrationTest/src/test/java/ghidra/program/util/DataTypeCleanerTest.java