@Test
	public void testReplaceAtPacked() {

		struct.setPackingEnabled(true); // test case where there is no component

		assertEquals(12, struct.getLength());
		assertEquals(4, struct.getNumDefinedComponents());

		struct.replaceAtOffset(0, DataType.DEFAULT, -1, "a", null);
		struct.replaceAtOffset(1, ByteDataType.dataType, -1, "b", null);
		struct.replaceAtOffset(2, ByteDataType.dataType, -1, "c", null);

		assertEquals(12, struct.getLength());
		assertEquals(5, struct.getNumDefinedComponents());

		DataTypeComponent[] comps = struct.getDefinedComponents();

		assertEquals(0, comps[0].getOffset());
		assertEquals(0, comps[0].getOrdinal());
		assertTrue(Undefined1DataType.dataType.isEquivalent(comps[0].getDataType()));

		assertEquals(1, comps[1].getOffset());
		assertEquals(1, comps[1].getOrdinal());
		assertTrue(ByteDataType.dataType.isEquivalent(comps[1].getDataType()));

		assertEquals(2, comps[2].getOffset());
		assertEquals(2, comps[2].getOrdinal());
		assertTrue(ByteDataType.dataType.isEquivalent(comps[2].getDataType()));

		assertEquals(4, comps[3].getOffset());
		assertEquals(3, comps[3].getOrdinal());
		assertTrue(DWordDataType.dataType.isEquivalent(comps[3].getDataType()));

		assertEquals(8, comps[4].getOffset());
		assertEquals(4, comps[4].getOrdinal());
		assertTrue(ByteDataType.dataType.isEquivalent(comps[4].getDataType()));

	}
/Test
pack(disabled)
Structure Test {
   0   byte   1   field1   "Comment1"
   2   word   2      "Comment2"
   4   dword   4   field3   ""
   8   byte   1   field4   "Comment4"
   9   char[0]   0   zarray1   ""
   12   long   4   field4   ""
   16   long[0]   0   zarray2   ""
}
Length: 16 Alignment: 1
Ghidra/Framework/SoftwareModeling/src/test/java/ghidra/program/database/data/StructureDBTest.java