@Test
	public void testDeleteArray() throws Exception {
		Array array =
			(Array) dataMgr.resolve(new ArrayDataType(struct, 5, struct.getLength()), null);
		DataType dt = array.getDataType();
		String name = dt.getName();
		listing.createData(addr(0x100), array, 0);

		listing.getDataAt(addr(0x100));
		CategoryPath path = dt.getCategoryPath();
		assertNotNull(path);
		dt.getDataTypeManager().remove(dt);

		assertTrue(array.isDeleted());
		assertNull(dt.getDataTypeManager().getDataType(path, name));
	}
To change the template for this generated type comment go to
Window>Preferences>Java>Code Generation>Code and Comments
Ghidra/Features/Base/src/test.slow/java/ghidra/program/database/data/ArrayTest.java