use of org.kie.kogito.trusty.storage.common.TrustyStorageService in project kogito-apps by kiegroup.
the class ExplainerServiceHandlerRegistryTest method setup.
@BeforeEach
@SuppressWarnings("unchecked")
public void setup() {
TrustyStorageService trustyStorage = mock(TrustyStorageService.class);
limeExplainerServiceHandler = spy(new LIMEExplainerServiceHandler(trustyStorage));
counterfactualExplainerServiceHandler = spy(new CounterfactualExplainerServiceHandler(trustyStorage, mock(CounterfactualExplainabilityResultsManagerSlidingWindow.class), mock(CounterfactualExplainabilityResultsManagerDuplicates.class)));
Instance<ExplainerServiceHandler<?>> explanationHandlers = mock(Instance.class);
when(explanationHandlers.stream()).thenReturn(Stream.of(limeExplainerServiceHandler, counterfactualExplainerServiceHandler));
registry = new ExplainerServiceHandlerRegistry(explanationHandlers);
storageLIME = mock(Storage.class);
storageCounterfactual = mock(Storage.class);
when(trustyStorage.getLIMEResultStorage()).thenReturn(storageLIME);
when(trustyStorage.getCounterfactualResultStorage()).thenReturn(storageCounterfactual);
decision = mock(Decision.class);
}
Aggregations