}
@Test
public void synchronize_after_with_nested() {
RuleDto rule = RuleTesting.newXooX1();
// insert db
dao.insert(dbSession, rule);
dao.addRuleParam(dbSession, rule, RuleParamDto.createFor(rule).setName("MyParam").setType("STRING").setDefaultValue("test"));
dbSession.commit();
// 0. Assert rules are in DB
assertThat(dao.findAll(dbSession)).hasSize(1);
assertThat(index.countAll()).isEqualTo(1);
tester.clearIndexes();
assertThat(index.countAll()).isEqualTo(0);
tester.get(Platform.class).executeStartupTasks();
assertThat(index.countAll()).isEqualTo(1);
assertThat(index.getByKey(rule.getKey()).param("MyParam").defaultValue()).isEqualTo("test");
}