@Test public void getSearchResultReturnsNullIfTheSearchResultIsNotFound() { Optional<SearchResult> searchResult = instance.getSearchResult(UUID.randomUUID()); assertThat(searchResult, is(not(present()))); }
public Optional<SearchResult> getSearchResult(UUID id) { return Optional.ofNullable(cache.getIfPresent(id)); }
SearchStore { public Optional<SearchResult> getSearchResult(UUID id) { return Optional.ofNullable(cache.getIfPresent(id)); } }
SearchStore { public Optional<SearchResult> getSearchResult(UUID id) { return Optional.ofNullable(cache.getIfPresent(id)); } SearchStore(Timeout searchResultAvailabilityTime); }
SearchStore { public Optional<SearchResult> getSearchResult(UUID id) { return Optional.ofNullable(cache.getIfPresent(id)); } SearchStore(Timeout searchResultAvailabilityTime); Optional<SearchResult> getSearchResult(UUID id); UUID add(SearchResult searchResult); }
SearchStore { public Optional<SearchResult> getSearchResult(UUID id) { return Optional.ofNullable(cache.getIfPresent(id)); } SearchStore(Timeout searchResultAvailabilityTime); Optional<SearchResult> getSearchResult(UUID id); UUID add(SearchResult searchResult);  }