@Test
	public void testPointerTypedefEquivalence2() 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());

		TypeDef dt2 = new PointerTypedef("john", st, -1, dtm,
			program.getAddressFactory().getRegisterSpace());
		assertFalse(dt2.isAutoNamed());
		assertFalse(dt2.hasLanguageDependantLength());
		assertEquals(2, dt.getLength());
		assertEquals("john", dt2.getName());
		TypeDef dbDt2 = (TypeDef) dtm.resolve(dt2, null);
		assertTrue(dbDt != dbDt2);
		assertFalse(dbDt.isEquivalent(dbDt2));
		assertFalse(dbDt2.isEquivalent(dbDt));
		assertTrue(dbDt2 instanceof DatabaseObject); // transforms to TypedefDB
		assertTrue(dt2.isEquivalent(dbDt2));
		assertEquals(dt2.getName(), 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