service.delete(1);
verify(ruleDao).update(eq(batchSession), ruleCaptor.capture());
verify(dao, times(2)).update(characteristicCaptor.capture(), eq(batchSession));
CharacteristicDto subCharacteristicDto = characteristicCaptor.getAllValues().get(0);
CharacteristicDto characteristicDto = characteristicCaptor.getAllValues().get(1);
// Sub characteristic is disable
assertThat(subCharacteristicDto.getId()).isEqualTo(2);
assertThat(subCharacteristicDto.isEnabled()).isFalse();
assertThat(subCharacteristicDto.getUpdatedAt()).isEqualTo(now);
// Characteristic is disable
assertThat(characteristicDto.getId()).isEqualTo(1);
assertThat(characteristicDto.isEnabled()).isFalse();
assertThat(characteristicDto.getUpdatedAt()).isEqualTo(now);
}