use of org.kie.kogito.trusty.service.common.TrustyService in project kogito-apps by kiegroup.
the class ExplainabilityResultConsumerTest method setup.
@BeforeEach
@SuppressWarnings("unchecked")
void setup() {
trustyService = mock(TrustyService.class);
storageExceptionsProvider = mock(StorageExceptionsProvider.class);
trustyStorage = mock(TrustyStorageService.class);
limeExplainerServiceHandler = new LIMEExplainerServiceHandler(trustyStorage);
counterfactualExplainerServiceHandler = new CounterfactualExplainerServiceHandler(trustyStorage, mock(CounterfactualExplainabilityResultsManagerSlidingWindow.class), mock(CounterfactualExplainabilityResultsManagerDuplicates.class));
explanationHandlers = mock(Instance.class);
when(explanationHandlers.stream()).thenReturn(Stream.of(limeExplainerServiceHandler, counterfactualExplainerServiceHandler));
explainerServiceHandlerRegistry = new ExplainerServiceHandlerRegistry(explanationHandlers);
consumer = new ExplainabilityResultConsumer(trustyService, explainerServiceHandlerRegistry, TrustyServiceTestUtils.MAPPER, storageExceptionsProvider, SmallRyeManagedExecutor.builder().build());
}
Aggregations