### Question:
StructureDB extends CompositeDB implements Structure { @Override public void deleteAtOffset(int offset) { lock.acquire(); try { checkDeleted(); if (offset < 0) { throw new IllegalArgumentException("Offset cannot be negative."); } if (offset >= structLength) { return; } int index = Collections.binarySearch(components, Integer.valueOf(offset), offsetComparator); int offsetDelta = 0; int ordinalDelta = 0; if (index < 0) { index = -index - 1; --ordinalDelta; offsetDelta = -1; shiftOffsets(index, ordinalDelta, offsetDelta); } else { index = advanceToLastComponentContainingOffset(index, offset); DataTypeComponentDB dtc = components.get(index); while (dtc.containsOffset(offset)) { doDelete(index); if (--index < 0) { break; } dtc = components.get(index); } } adjustInternalAlignment(true); notifySizeChanged(); } finally { lock.release(); } } StructureDB(DataTypeManagerDB dataMgr, DBObjectCache<DataTypeDB> cache,
			CompositeDBAdapter compositeAdapter, ComponentDBAdapter componentAdapter,
			Record record); @Override String getRepresentation(MemBuffer buf, Settings settings, int length); @Override DataTypeComponent add(DataType dataType, int length, String name, String comment); @Override void growStructure(int amount); @Override DataTypeComponent insert(int ordinal, DataType dataType, int length, String name,
			String comment); @Override DataTypeComponent addBitField(DataType baseDataType, int bitSize, String componentName,
			String comment); @Override DataTypeComponent insertBitField(int ordinal, int byteWidth, int bitOffset,
			DataType baseDataType, int bitSize, String componentName, String comment); @Override DataTypeComponent insertBitFieldAt(int byteOffset, int byteWidth, int bitOffset,
			DataType baseDataType, int bitSize, String componentName, String comment); @Override void delete(int ordinal); @Override void delete(int[] ordinals); @Override boolean isPartOf(DataType dataType); @Override int getNumComponents(); @Override int getNumDefinedComponents(); @Override DataTypeComponent getComponent(int ordinal); @Override DataTypeComponent[] getComponents(); @Override DataType copy(DataTypeManager dtm); @Override Structure clone(DataTypeManager dtm); @Override boolean isNotYetDefined(); @Override int getAlignment(); @Override int getLength(); @Override void clearComponent(int ordinal); @Override void deleteAtOffset(int offset); @Override DataTypeComponent getComponentAt(int offset); @Override DataTypeComponent getDataTypeAt(int offset); @Override DataTypeComponentDB[] getDefinedComponents(); @Override final DataTypeComponent insertAtOffset(int offset, DataType dataType, int length); @Override DataTypeComponent insertAtOffset(int offset, DataType dataType, int length, String name,
			String comment); @Override DataTypeComponent replace(int ordinal, DataType dataType, int length, String name,
			String comment); @Override final DataTypeComponent replace(int ordinal, DataType dataType, int length); @Override DataTypeComponent replaceAtOffset(int offset, DataType dataType, int length, String name,
			String comment); @Override void replaceWith(DataType dataType); @Override void dataTypeDeleted(DataType dt); @Override void dataTypeSizeChanged(DataType dt); @Override void dataTypeAlignmentChanged(DataType dt); @Override boolean isEquivalent(DataType dataType); @Override String getDefaultLabelPrefix(); @Override void dataTypeReplaced(DataType oldDt, DataType newDt); @Override void dataTypeNameChanged(DataType dt, String oldName); @Override void deleteAll(); @Override void realign(); @Override void pack(int packingSize); @Override boolean hasFlexibleArrayComponent(); @Override DataTypeComponentDB getFlexibleArrayComponent(); @Override DataTypeComponent setFlexibleArrayComponent(DataType flexType, String name,
			String comment); @Override void clearFlexibleArrayComponent();  }### Answer:
@Test public void testDeleteAtOffset() { struct.deleteAtOffset(2); assertEquals(6, struct.getLength()); assertEquals(3, struct.getNumComponents()); DataTypeComponent[] comps = struct.getDefinedComponents(); assertEquals(DWordDataType.class, comps[1].getDataType().getClass()); assertEquals(1, comps[1].getOffset()); }