@Test
public void executeTest() {

    when(registryContext.lookup(KieSession.class)).thenReturn(kieSession);
    Function<Object, ValueWrapper> alwaysMatchFunction = ValueWrapper::of;
    ValidateFactCommand validateFactCommand = new ValidateFactCommand(asList(new FactCheckerHandle(String.class, alwaysMatchFunction, scenarioResult)));
    when(kieSession.getObjects(any(ObjectFilter.class))).thenReturn(Collections.singleton(null));
    validateFactCommand.execute(registryContext);
    verify(scenarioResult, times(1)).setResult(anyBoolean());
    reset(scenarioResult);
    when(kieSession.getObjects(any(ObjectFilter.class))).thenReturn(Collections.emptyList());
    when(scenarioResult.getFactMappingValue()).thenReturn(factMappingValue);
    when(factMappingValue.getStatus()).thenReturn(FactMappingValueStatus.FAILED_WITH_EXCEPTION);
    validateFactCommand.execute(registryContext);
    verify(scenarioResult, times(0)).setResult(anyBoolean());
}