when(characteristicDao.selectByKey("COMPILER", session)).thenReturn(subCharacteristic);
when(characteristicDao.selectById(2, session)).thenReturn(subCharacteristic);
CharacteristicDto characteristic = new CharacteristicDto().setId(1).setKey("PORTABILITY").setName("Portability").setOrder(2);
when(characteristicDao.selectById(1, session)).thenReturn(characteristic);
operations.updateRule(new RuleChange().setRuleKey(ruleKey).setDebtCharacteristicKey("COMPILER"), authorizedUserSession);
verify(ruleDao).update(eq(session), ruleCaptor.capture());
verify(session).commit();
RuleDto result = ruleCaptor.getValue();