@Test
	public void testPointerEquivalence() throws Exception {

		Structure structA = new StructureDataType("structA", 0);
		structA.setCategoryPath(new CategoryPath("/catA"));
		structA.setPackingEnabled(true);

		Pointer p = new PointerDataType(structA);

		structA.add(p);
		structA.add(ByteDataType.dataType);
		structA.add(LongDataType.dataType);

		int txId = program.startTransaction("Add Struct");
		Structure structAp = (Structure) dtm.resolve(structA, null);
		program.endTransaction(txId, true);

		// Check structure equivalence

		assertTrue(structAp.isEquivalent(structA));

		assertTrue(structAp.isEquivalent(structAp.clone(null)));

		assertTrue(structAp.isEquivalent(structAp.copy(null)));

		// Check pointer equivalence

		Pointer p1 = dtm.getPointer(structAp);

		DataTypeComponent component = structAp.getComponent(0);
		assertNotNull(component);

		DataType dt = component.getDataType();
		assertTrue(dt instanceof Pointer);

		assertTrue(p1.isEquivalent(dt));

		DataType dt2 = p1.clone(null);

		assertTrue(p1.isEquivalent(dt2));

		assertTrue(dt2.isEquivalent(p1.clone(null)));
	}
Tests for manipulating data types in the category/data type tree.
Ghidra/Features/Base/src/test.slow/java/ghidra/program/model/data/DataTypeTest.java