### Question:
ItemDefinitionRecordEngine implements DataTypeRecordEngine { @Override public List<DataType> destroy(final DataType dataType) { doDestroy(dataType); return refreshDependentDataTypesFromDestroyOperation(dataType); } @Inject  ItemDefinitionRecordEngine(final ItemDefinitionStore itemDefinitionStore,
                                      final ItemDefinitionDestroyHandler itemDefinitionDestroyHandler,
                                      final ItemDefinitionUpdateHandler itemDefinitionUpdateHandler,
                                      final ItemDefinitionCreateHandler itemDefinitionCreateHandler,
                                      final DataTypeDestroyHandler dataTypeDestroyHandler,
                                      final DataTypeUpdateHandler dataTypeUpdateHandler,
                                      final DataTypeCreateHandler dataTypeCreateHandler,
                                      final DataTypeNameValidator dataTypeNameValidator); @PostConstruct void init(); @Override List<DataType> update(final DataType dataType); @Override List<DataType> destroy(final DataType dataType); @Override List<DataType> destroyWithoutDependentTypes(final DataType dataType); @Override List<DataType> create(final DataType dataType); @Override List<DataType> create(final DataType record,
                                 final DataType reference,
                                 final CreationType creationType); @Override boolean isValid(final DataType dataType); void doUpdate(final DataType dataType,
                         final ItemDefinition itemDefinition); void doDestroy(final DataType dataType);  }### Answer:
@Test public void testDestroy() { final DataType dataType = mock(DataType.class); final List<DataType> expectedDependentDataTypes = asList(mock(DataType.class), mock(DataType.class)); when(dataTypeDestroyHandler.refreshDependentDataTypes(dataType)).thenReturn(expectedDependentDataTypes); final List<DataType> actualDependentDataTypes = recordEngine.destroy(dataType); verify(recordEngine).doDestroy(dataType); assertEquals(expectedDependentDataTypes, actualDependentDataTypes); }