@Test
public void getReplaceableTermsOfQueryReturnsExpectedPairsForComplexQuery() {

    // given
    var simpleQuery = "(test | java) & -jenkins junnit~2 | \"continuous delivery\"~10 (apache wicket) \"kotlin\" (((typescript | spring) & testing & junit*))";
    var expectedPairs = List.of(
            Pair.of(1, 4),
            Pair.of(8, 11),
            Pair.of(17, 23),
            Pair.of(62, 67),
            Pair.of(69, 74),
            Pair.of(89, 98),
            Pair.of(102, 107),
            Pair.of(112, 118)
    );
    // when
    var actualPairs = HibernateSimpleQueryUtils.getReplaceableTermsOfQuery(simpleQuery);
    // then
    assertThat(actualPairs).containsExactlyInAnyOrderElementsOf(expectedPairs);
}