### Question:
DataTypeShortcuts { boolean isTargetElementAnInput(final KeyboardEvent event) { final Element element = getTarget(event); return element instanceof HTMLInputElement; } @Inject  DataTypeShortcuts(final DataTypeListShortcuts listShortcuts); void init(final DataTypeList dataTypeList); void setup(); void teardown(); void reset(); void highlight(final Element element); void enable(); void disable();  }### Answer:
@Test public void testIsTargetElementAnInputWhenItReturnsTrue() { event.target = mock(HTMLInputElement.class); assertTrue(shortcuts.isTargetElementAnInput(event)); }
@Test public void testIsTargetElementAnInputWhenItReturnsFalse() { event.target = mock(HTMLDivElement.class); assertFalse(shortcuts.isTargetElementAnInput(event)); }
@Test public void testIsSearchBarTargetWhenItReturnsTrue() { final HTMLInputElement element = mock(HTMLInputElement.class); event.target = element; when(element.getAttribute("data-field")).thenReturn("search-bar"); assertTrue(shortcuts.isTargetElementAnInput(event)); }