use of datawave.query.util.MetadataHelper in project datawave by NationalSecurityAgency.
the class FacetCheckTest method before.
@Before
public void before() throws TableNotFoundException, IllegalAccessException, InstantiationException {
Multimap<String, String> facets = HashMultimap.create();
facets.put("FACET1", "VALUE");
facets.put("FACET2", "VALUE");
facets.put("FACET3", "VALUE");
ShardQueryConfiguration shardQueryConfiguration = mock(ShardQueryConfiguration.class);
FacetedConfiguration facetedConfiguration = mock(FacetedConfiguration.class);
expect(facetedConfiguration.getFacetMetadataTableName()).andReturn("facetMetadata");
MetadataHelper metadataHelper = mock(MetadataHelper.class);
expect(metadataHelper.isIndexed(anyString(), anyObject())).andAnswer(() -> indexedFields.contains(getCurrentArguments()[0]));
expect(metadataHelper.getFacets("facetMetadata")).andReturn(facets);
replay(shardQueryConfiguration, facetedConfiguration, metadataHelper);
facetCheck = new FacetCheck(shardQueryConfiguration, facetedConfiguration, metadataHelper);
}
Aggregations