@Test
public void multiUnit() {

    Properties properties = new Properties();
    properties.put("kogito.rules.some.other.config", "ignore me");
    properties.put("kogito.rules.\"my.rule.Unit\".event-processing-type", EventProcessingType.CLOUD.name());
    properties.put("kogito.rules.\"my.rule.Unit\".clock-type", ClockType.PSEUDO.name());
    properties.put("kogito.rules.\"my.rule.Unit\".sessions-pool", "10");
    properties.put("kogito.rules.\"my.rule.Unit2\".event-processing-type", EventProcessingType.STREAM.name());
    GeneratorContext context = GeneratorContext.ofProperties(properties);
    List<NamedRuleUnitConfig> namedRuleUnitConfigs = NamedRuleUnitConfig.fromContext(context);
    assertThat(namedRuleUnitConfigs).hasSize(2);
    Map<String, RuleUnitConfig> map =
            namedRuleUnitConfigs.stream()
                    .collect(toMap(NamedRuleUnitConfig::getCanonicalName, NamedRuleUnitConfig::getConfig));
    RuleUnitConfig myRuleUnitConfig = map.get("my.rule.Unit");
    assertThat(myRuleUnitConfig).isNotNull();
    assertThat(myRuleUnitConfig.getDefaultedEventProcessingType()).isEqualTo(EventProcessingType.CLOUD);
    assertThat(myRuleUnitConfig.getDefaultedClockType()).isEqualTo(ClockType.PSEUDO);
    assertThat(myRuleUnitConfig.getSessionPool().getAsInt()).isEqualTo(10);
    RuleUnitConfig myRuleUnit2Config = map.get("my.rule.Unit2");
    assertThat(myRuleUnit2Config).isNotNull();
    assertThat(myRuleUnit2Config.getDefaultedEventProcessingType()).isEqualTo(EventProcessingType.STREAM);
    assertThat(myRuleUnit2Config.getDefaultedClockType()).isEqualTo(ClockType.REALTIME);
    assertThat(myRuleUnit2Config.getSessionPool()).isEmpty();
}