@Test
public void replaceSubstringReplacesWholeStringWhenStartIndexZeroAndEndIndexLastOfWord() {

    // given
    var originalString = "replace";
    var replacement = "java";
    var startIndex = 0;
    var endIndex = originalString.length() - 1;
    var startEndIndexPair = Pair.of(startIndex, endIndex);
    // when
    var actualString = HibernateSimpleQueryUtils.replaceSubstring(startEndIndexPair, originalString, replacement);
    // then
    assertThat(actualString).isEqualTo(replacement);
}