2828
2929import org .junit .jupiter .api .BeforeEach ;
3030import org .junit .jupiter .api .Test ;
31-
3231import org .springframework .beans .factory .annotation .Autowired ;
3332import org .springframework .boot .autoconfigure .EnableAutoConfiguration ;
3433import org .springframework .boot .test .autoconfigure .orm .jpa .DataJpaTest ;
4140import org .springframework .data .domain .ScrollPosition ;
4241import org .springframework .data .domain .Slice ;
4342import org .springframework .data .domain .Window ;
44- import org .springframework .data .domain .WindowIterator ;
43+ import org .springframework .data .support .WindowIterator ;
4544import org .springframework .data .util .Streamable ;
4645
4746import com .github .javafaker .Faker ;
@@ -124,7 +123,7 @@ void sliceThroughResultsWithSkipAndLimit() {
124123 void scrollThroughResultsWithSkipAndLimit () {
125124
126125 Window <Book > window ;
127- ScrollPosition scrollPosition = OffsetScrollPosition . initial ();
126+ ScrollPosition scrollPosition = ScrollPosition . offset ();
128127
129128 do {
130129
@@ -146,7 +145,7 @@ void scrollThroughResultsUsingWindowIteratorWithSkipAndLimit() {
146145
147146 WindowIterator <Book > iterator = WindowIterator
148147 .of (scrollPosition -> books .findTop2ByTitleContainsOrderByPublicationDate ("the-crazy-book-" , scrollPosition ))
149- .startingAt (OffsetScrollPosition . initial ());
148+ .startingAt (ScrollPosition . offset ());
150149
151150 List <Book > allBooks = Streamable .of (() -> iterator ).stream ().toList ();
152151 assertThat (allBooks ).hasSize (50 );
@@ -162,7 +161,7 @@ void scrollThroughResultsUsingWindowIteratorWithSkipAndLimit() {
162161 void scrollThroughResultsWithKeyset () {
163162
164163 Window <Book > window ;
165- ScrollPosition scrollPosition = KeysetScrollPosition . initial ();
164+ ScrollPosition scrollPosition = ScrollPosition . keyset ();
166165 do {
167166
168167 window = books .findTop2ByTitleContainsOrderByPublicationDate ("the" , scrollPosition );
0 commit comments