### Question:
DataTypeListShortcutsView implements DataTypeListShortcuts.View { @Override public Optional<DataTypeListItem> getCurrentDataTypeListItem() { return getDataTypeListItem(getCurrentUUID()); } @Inject  DataTypeListShortcutsView(final ScrollHelper scrollHelper); void init(final DataTypeListShortcuts presenter); @Override Optional<Element> getFirstDataTypeRow(); @Override Optional<Element> getNextDataTypeRow(); @Override Optional<Element> getPrevDataTypeRow(); @Override Optional<DataTypeListItem> getCurrentDataTypeListItem(); @Override List<DataTypeListItem> getVisibleDataTypeListItems(); @Override void highlight(final Element element); @Override void focusIn(); void reset();  }### Answer:
@Test public void testGetCurrentDataTypeListItem() { final DataTypeList dataTypeList = mock(DataTypeList.class); final DataTypeListItem item = mock(DataTypeListItem.class); final DataType dataType = fakeDataType("123"); final Element dataTypeRow1 = fakeDataTypeRow("123"); final Element dataTypeRow2 = fakeDataTypeRow("456"); final Element dataTypeRow3 = fakeDataTypeRow("789"); final JQueryList<Element> jQueryList = mock(JQueryList.class); final List<DataTypeListItem> items = singletonList(item); when(item.getDataType()).thenReturn(dataType); when(dataTypeList.getItems()).thenReturn(items); when(presenter.getDataTypeList()).thenReturn(dataTypeList); jQueryList.length = 3; when(jQueryList.get(0)).thenReturn(dataTypeRow1); when(jQueryList.get(1)).thenReturn(dataTypeRow2); when(jQueryList.get(2)).thenReturn(dataTypeRow3); doReturn(jQueryList).when(view).filterVisible(); doReturn("123").when(view).getCurrentUUID(); final DataTypeListItem actual = view.getCurrentDataTypeListItem().orElseThrow(RuntimeException::new); assertEquals(item, actual); }