1515 */
1616package org .springframework .data .elasticsearch .client .elc ;
1717
18+ import co .elastic .clients .elasticsearch .core .search .HitsMetadata ;
19+ import co .elastic .clients .elasticsearch .core .search .Suggestion ;
20+ import co .elastic .clients .elasticsearch .core .search .TotalHitsRelation ;
21+ import co .elastic .clients .json .jackson .JacksonJsonpMapper ;
22+
1823import java .util .ArrayList ;
1924import java .util .List ;
2025
2631import com .google .common .collect .ImmutableList ;
2732import com .google .common .collect .ImmutableMap ;
2833
29- import co .elastic .clients .elasticsearch .core .search .HitsMetadata ;
30- import co .elastic .clients .elasticsearch .core .search .Suggestion ;
31- import co .elastic .clients .elasticsearch .core .search .TotalHitsRelation ;
32- import co .elastic .clients .json .jackson .JacksonJsonpMapper ;
33-
3434/**
3535 * Tests for the factory class to create {@link SearchDocumentResponse} instances.
3636 *
@@ -41,39 +41,40 @@ class SearchDocumentResponseBuilderUnitTests {
4141
4242 private JacksonJsonpMapper jsonpMapper = new JacksonJsonpMapper ();
4343
44- @ Test // GH- 2681
44+ @ Test // # 2681
4545 void shouldGetPhraseSuggestion () throws JSONException {
4646 // arrange
4747 final var hitsMetadata = new HitsMetadata .Builder <EntityAsMap >()
4848 .total (total -> total
49- .value (0 )
50- .relation (TotalHitsRelation .Eq ))
49+ .value (0 )
50+ .relation (TotalHitsRelation .Eq ))
5151 .hits (new ArrayList <>())
5252 .build ();
5353
5454 final var suggestionTest = new Suggestion .Builder <EntityAsMap >()
55- .phrase (phrase -> phrase
56- .text ("National" )
57- .offset (0 )
58- .length (8 )
59- .options (option -> option
60- .text ("nations" )
61- .highlighted ("highlighted-nations" )
62- .score (0.11480146 )
63- .collateMatch (false ))
64- .options (option -> option
65- .text ("national" )
66- .highlighted ("highlighted-national" )
67- .score ( 0.08063514 )
68- .collateMatch (false )))
69- .build ();
70-
71- final var sortProperties = ImmutableMap .<String , List <Suggestion <EntityAsMap >>>builder ()
72- .put ("suggestionTest" , ImmutableList .of (suggestionTest ))
73- .build ();
55+ .phrase (phrase -> phrase
56+ .text ("National" )
57+ .offset (0 )
58+ .length (8 )
59+ .options (option -> option
60+ .text ("nations" )
61+ .highlighted ("highlighted-nations" )
62+ .score (0.11480146 )
63+ .collateMatch (false ))
64+ .options (option -> option
65+ .text ("national" )
66+ .highlighted ("highlighted-national" )
67+ .score (0.08063514 )
68+ .collateMatch (false )))
69+ .build ();
70+
71+ final var sortProperties = ImmutableMap .<String , List <Suggestion <EntityAsMap >>> builder ()
72+ .put ("suggestionTest" , ImmutableList .of (suggestionTest ))
73+ .build ();
7474
7575 // act
76- final var actual = SearchDocumentResponseBuilder .from (hitsMetadata , null , null , null , sortProperties , null , jsonpMapper );
76+ final var actual = SearchDocumentResponseBuilder .from (hitsMetadata , null , null , null , sortProperties , null ,
77+ jsonpMapper );
7778
7879 // assert
7980 SoftAssertions softly = new SoftAssertions ();
0 commit comments