From d6326f2705bb1509a6be7d5fbd90ab65f367dfe1 Mon Sep 17 00:00:00 2001 From: ptaheri Date: Fri, 4 Aug 2023 17:06:37 -0400 Subject: [PATCH] forgot the file --- .../dashboard/MockMultiSearchResponse.java | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 pepper-apis/dsm-core/src/test/java/org/broadinstitute/dsm/model/dashboard/MockMultiSearchResponse.java diff --git a/pepper-apis/dsm-core/src/test/java/org/broadinstitute/dsm/model/dashboard/MockMultiSearchResponse.java b/pepper-apis/dsm-core/src/test/java/org/broadinstitute/dsm/model/dashboard/MockMultiSearchResponse.java new file mode 100644 index 0000000000..b1e49197fa --- /dev/null +++ b/pepper-apis/dsm-core/src/test/java/org/broadinstitute/dsm/model/dashboard/MockMultiSearchResponse.java @@ -0,0 +1,29 @@ +package org.broadinstitute.dsm.model.dashboard; + +import org.elasticsearch.action.search.MultiSearchResponse; +import org.elasticsearch.action.search.SearchResponse; +import org.elasticsearch.search.SearchHits; + +class MockMultiSearchResponse extends MultiSearchResponse { + + public MockMultiSearchResponse() { + super(null); + } + + @Override + public Item[] getResponses() { + SearchResponse searchResponse = new SearchResponse() { + @Override + public SearchHits getHits() { + return new SearchHits(null, VerticalHighlightedBarChartStrategyTest.TOTAL_HITS, 0L); + } + }; + SearchResponse searchResponse2 = new SearchResponse() { + @Override + public SearchHits getHits() { + return new SearchHits(null, VerticalHighlightedBarChartStrategyTest.TOTAL_HITS2, 0L); + } + }; + return new Item[] {new Item(searchResponse, null), new Item(searchResponse2, null)}; + } +} \ No newline at end of file