@Test
public void nearestRootTermReturnsTermWhenThresholdIsExceeded() {

    // given
    var rootTerm = "banana";
    var derivedTerms = Set.of("yellow-thing", "monkey-snack");
    var term = "ylow-thing";
    var threshold = 1; // smaller than the editing distance of 2
    var calculator = new RootTermDistanceCalculator(rootTerm, derivedTerms);
    // when
    var actualRootTerm = RootTermDistanceCalculator.nearestRootTerm(Set.of(calculator), term, threshold);
    // then
    assertThat(actualRootTerm).isEqualTo(term);
}