### Question:
CreateArrayInStructureCmd implements Command { public CreateArrayInStructureCmd(Address addr, int numElements, DataType dt, int[] compPath) { this.addr = addr; this.numElements = numElements; this.dataType = dt; this.compPath = compPath; } CreateArrayInStructureCmd(Address addr, int numElements, DataType dt,
									  int[] compPath); boolean applyTo(DomainObject obj); String getStatusMsg(); String getName();  }### Answer:
@Test public void testCreateArrayInStructureCmd() throws Exception { Address addr = addr(UNDEFINED_AREA); int structLen = 30; Command cmd = new CreateStructureCmd(addr, structLen); cmd.applyTo(program); DataType dt = new Pointer16DataType(new ByteDataType()); cmd = new CreateArrayInStructureCmd(addr, 10, dt, new int[] { 0 }); cmd.applyTo(program); Data d = program.getListing().getDataAt(addr); assertNotNull(d); assertTrue(d.isDefined()); assertTrue(d.getDataType() instanceof Structure); assertEquals(structLen, d.getLength()); Structure struct = (Structure) d.getDataType(); struct.setName("TestStructA"); assertEquals(structLen, struct.getLength()); assertEquals(11, struct.getNumComponents()); DataTypeComponent comp = struct.getComponent(0); assertEquals(20, comp.getLength()); assertTrue(comp.getDataType() instanceof Array); Array a = (Array) comp.getDataType(); assertEquals(2, a.getElementLength()); assertEquals(10, a.getNumElements()); assertTrue(a.getDataType().isEquivalent(dt)); for (int i = 1; i < 11; i++) { comp = struct.getComponent(i); assertEquals(1, comp.getLength()); assertEquals(DataType.DEFAULT, comp.getDataType()); } DataType structA = program.getDataTypeManager().getDataType(CategoryPath.ROOT, "TestStructA"); assertEquals(struct, structA); }