@Test
public void calculate_new_technical_debt_when_new_debt_is_null() throws Exception {
Issue issue = new DefaultIssue().setKey("A").setCreationDate(tenDaysAgo).setDebt(null).setChanges(
newArrayList(
new FieldDiffs().setDiff("technicalDebt", oneDay, null).setCreationDate(null),
new FieldDiffs().setDiff("technicalDebt", null, oneDay).setCreationDate(nineDaysAgo)
)
);
assertThat(issueChangelogDebtCalculator.calculateNewTechnicalDebt(issue, rightNow)).isNull();
}