### Question:
DataTypeListItem { int getPositionY(final Element element) { return getDNDListComponent().getPositionY(element); } @Inject  DataTypeListItem(final View view,
                            final DataTypeSelect dataTypeSelectComponent,
                            final DataTypeConstraint dataTypeConstraintComponent,
                            final SmallSwitchComponent dataTypeListComponent,
                            final DataTypeManager dataTypeManager,
                            final DataTypeConfirmation confirmation,
                            final DataTypeNameFormatValidator nameFormatValidator,
                            final Event<DataTypeEditModeToggleEvent> editModeToggleEvent,
                            final Event<DataTypeChangedEvent> dataTypeChangedEvent); void init(final DataTypeList dataTypeList); DataType getDataType(); boolean isReadOnly(); int getLevel(); boolean isCollapsed(); void expand(); void collapse(); void enableEditMode(); void disableEditMode(); void saveAndCloseEditMode(); void remove(); Command removeItem(); Command destroy(); void destroyWithDependentTypes(); void destroyWithoutDependentTypes(); String getType(); void insertFieldAbove(); String insertFieldAbove(final DataType dataType); void insertFieldBelow(); String insertFieldBelow(final DataType dataType); void insertNestedField(); void insertNestedField(final DataType newDataType); HTMLElement getDragAndDropElement(); void highlightLevel(final DataType dataType);  }### Answer:
@Test public void testGetPositionY() { final DNDListComponent dndListComponent = mock(DNDListComponent.class); final Element element = mock(Element.class); final Integer expectedPositionY = 2; when(dataTypeList.getDNDListComponent()).thenReturn(dndListComponent); when(dndListComponent.getPositionY(element)).thenReturn(expectedPositionY); final Integer actualPositionY = listItem.getPositionY(element); assertEquals(expectedPositionY, actualPositionY); }