@Test
	public void testApplyArray() throws Exception {
		Array array =
			(Array) dataMgr.resolve(new ArrayDataType(struct, 5, struct.getLength()), null);

		listing.createData(addr(0x100), array, 0);

		Data data = listing.getDataAt(addr(0x100));
		assertNotNull(data);
		assertTrue(data.getDataType() instanceof Array);
		assertEquals(addr(0x100 + array.getLength() - 1), data.getMaxAddress());
	}
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