@Test
	public void testPointerTypedefEquivalence() throws Exception {

		DataType st = dtm.resolve(new StructureDataType("foo", 10), null);

		TypeDef dt = new PointerTypedef(null, st, -1, dtm,
			program.getAddressFactory().getRegisterSpace());
		assertTrue(dt.isAutoNamed());
		assertFalse(dt.hasLanguageDependantLength());
		assertEquals(2, dt.getLength());
		assertEquals("foo *16 " + formatAttributes("space(register)"), dt.getName());
		TypeDef dbDt = (TypeDef) dtm.resolve(dt, null);
		assertTrue(dbDt instanceof DatabaseObject); // transforms to TypedefDB
		assertTrue(dt.isEquivalent(dbDt));
		assertEquals(dt.getName(), dbDt.getName());

		dt = (TypeDef) dt.copy(dtm);
		assertTrue(dbDt == dtm.resolve(dt, null)); // should resolve to same instance

		dt = (TypeDef) dt.copy(dtm);
		PointerTypeSettingsDefinition.DEF.setType(dt.getDefaultSettings(), PointerType.IMAGE_BASE_RELATIVE);
		TypeDef dbDt2 = (TypeDef) dtm.resolve(dt, null);    // should resolve to new instance
		assertTrue(dbDt != dbDt2);
		assertEquals("foo *16 " + formatAttributes("image-base-relative,space(register)"),
			dbDt2.getName());

		PointerTypeSettingsDefinition.DEF.clear(dbDt2.getDefaultSettings());
		assertEquals("foo *16 " + formatAttributes("space(register)") + DataType.CONFLICT_SUFFIX,
			dbDt2.getName());

	}
Tests for manipulating data types in the category/data type tree.
Ghidra/Features/Base/src/test.slow/java/ghidra/program/model/data/PointerTypedefDataTypeTest.java