### Question:
DMNEditorSearchIndex extends BaseEditorSearchIndex<DMNSearchableElement> { Command getNoResultsFoundCallback() { return () -> getSubIndex().onNoResultsFound(); } @Inject  DMNEditorSearchIndex(final DMNGraphSubIndex graphSubIndex,
                                final DMNGridSubIndex gridSubIndex,
                                final DMNDataTypesSubIndex dataTypesSubIndex,
                                final SessionManager sessionManager,
                                final Event<SearchPerformedEvent> searchPerformedEvent); @PostConstruct void init(); void setIsDataTypesTabActiveSupplier(final Supplier<Boolean> isDataTypesTabActiveSupplier); Supplier<Boolean> getIsDataTypesTabActiveSupplier();  }### Answer:
@Test public void testGetNoResultsFoundCallbackWhenExpressionEditorIsActive() { when(expressionEditor.isActive()).thenReturn(true); searchIndex.getNoResultsFoundCallback().execute(); verify(gridSubIndex).onNoResultsFound(); }
@Test public void testGetNoResultsFoundCallbackWhenExpressionEditorIsNotActive() { when(expressionEditor.isActive()).thenReturn(false); searchIndex.getNoResultsFoundCallback().execute(); verify(graphSubIndex).onNoResultsFound(); }