### Question:
FullTextSearch { public SearchTree search(SearchRequest searchRequest) { if(!searchAdapter.isEngineRunning()) { throw new SearchEngineNotRunningException(); } SearchResults searchResults; try { searchResults = searchAdapter.searchData(searchRequest); } catch (Throwable t) { throw new SearchFailedException(t); } return new SearchTree(searchResults, searchRequest); } FullTextSearch();   FullTextSearch(final SearchAdapter search); boolean isEngineRunning(); String getEndpoint(); boolean isSearchEngineEndpointConfigured(); SearchTree search(SearchRequest searchRequest); void indexUseCases(final UseCaseScenariosList useCaseScenariosList, final BuildIdentifier buildIdentifier); void indexSteps(final List<Step> steps, final List<StepLink> stepLinkList, final Scenario scenario, final UseCase usecase, final BuildIdentifier buildIdentifier); void updateAvailableBuilds(final List<BuildImportSummary> availableBuilds); static final String STEP; static final String SCENARIO; static final String USECASE; }### Answer:
@Test void searchWithoutRunningEngine() { givenNoRunningEngine(); assertThrows(SearchEngineNotRunningException.class, ()->fullTextSearch.search(new SearchRequest(new BuildIdentifier("testBranch", "testBuild"), "hi", true))); }
@Test void searchWithNoResults() { givenRunningEngineWithSearchResults(); SearchTree result = fullTextSearch.search(new SearchRequest(new BuildIdentifier("testBranch", "testBuild"), "IDONOTEXIST", true)); assertEquals(0, result.getResults().getChildren().size()); assertEquals(0, result.getTotalHits()); }