### Question:
DataTypeShortcuts { boolean isSearchBarTarget(final KeyboardEvent event) { final Element element = getTarget(event); return Objects.equals(element.getAttribute("data-field"), "search-bar"); } @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 testIsSearchBarTargetWhenItReturnsFalse() { final HTMLDivElement element = mock(HTMLDivElement.class); event.target = element; when(element.getAttribute("data-field")).thenReturn("something"); assertFalse(shortcuts.isSearchBarTarget(event)); }