use of datawave.webservice.query.logic.QueryLogicFactory in project datawave by NationalSecurityAgency.
the class ExtendedQueryExecutorBeanTest method testPurgeQueryCacheAndMiscAccessors_HappyPath.
@Test
public void testPurgeQueryCacheAndMiscAccessors_HappyPath() throws Exception {
// Set expectations
this.cache.clear();
// Run the test
PowerMock.replayAll();
QueryExecutorBean subject = new QueryExecutorBean();
setInternalState(subject, QueryCache.class, cache);
setInternalState(subject, ClosedQueryCache.class, closedCache);
setInternalState(subject, QueryMetricFactory.class, new QueryMetricFactoryImpl());
VoidResponse result1 = subject.purgeQueryCache();
QueryMetricsBean result5 = subject.getMetrics();
QueryLogicFactory result6 = subject.getQueryFactory();
Persister result7 = subject.getPersister();
QueryCache result8 = subject.getQueryCache();
PowerMock.verifyAll();
// Verify results
assertNotNull("Expected a non-null response", result1);
assertNull("Expected a null metrics instance", result5);
assertNull("Expected a null query logic factory", result6);
assertNull("Expected a null persister", result7);
assertNotNull("Expected a NON-null cache", result8);
}
Aggregations