1515 */
1616package org .springframework .data .gemfire .repository .support ;
1717
18- import static java .util .Arrays .*;
19- import static org .assertj .core .api .Assertions .*;
18+ import static org .assertj .core .api .Assertions .assertThat ;
2019
20+ import java .util .Arrays ;
2121import java .util .Collections ;
2222import java .util .List ;
2323
2424import javax .annotation .Resource ;
2525
26+ import org .junit .Before ;
27+ import org .junit .Test ;
28+ import org .junit .runner .RunWith ;
29+
2630import org .apache .geode .cache .GemFireCache ;
2731import org .apache .geode .cache .Region ;
2832import org .apache .geode .cache .RegionEvent ;
2933import org .apache .geode .cache .query .SelectResults ;
3034import org .apache .geode .cache .util .CacheListenerAdapter ;
31- import org .junit .Before ;
32- import org .junit .Test ;
33- import org .junit .runner .RunWith ;
35+
3436import org .springframework .beans .factory .annotation .Autowired ;
3537import org .springframework .context .annotation .Bean ;
3638import org .springframework .data .domain .Page ;
@@ -111,7 +113,7 @@ public void findAllPaged() {
111113
112114 assertThat (this .repository .count ()).isEqualTo (0 );
113115
114- List <Person > people = asList (new Person (1L , "Jon" , "Doe" ), new Person (2L , "Jane" , "Doe" ),
116+ List <Person > people = Arrays . asList (new Person (1L , "Jon" , "Doe" ), new Person (2L , "Jane" , "Doe" ),
115117 new Person (3L , "Cookie" , "Doe" ), new Person (4L , "Pie" , "Doe" ), new Person (5L , "Sour" , "Doe" ));
116118
117119 people .forEach (person -> this .template .put (person .getId (), person ));
@@ -156,17 +158,17 @@ public void findAllWithIds() {
156158 this .template .put (carter .getId (), carter );
157159 this .template .put (leroi .getId (), leroi );
158160
159- Iterable <Person > result = this .repository .findAllById (asList (carter .getId (), leroi .getId ()));
161+ Iterable <Person > result = this .repository .findAllById (Arrays . asList (carter .getId (), leroi .getId ()));
160162
161163 assertThat (result ).isNotNull ();
162164 assertThat (result ).hasSize (2 );
163- assertThat (result ).containsAll (asList (carter , leroi ));
165+ assertThat (result ).containsAll (Arrays . asList (carter , leroi ));
164166 }
165167
166168 @ Test
167169 public void findAllWithIdsReturnsNoMatches () {
168170
169- Iterable <Person > results = this .repository .findAllById (asList (1L , 2L ));
171+ Iterable <Person > results = this .repository .findAllById (Arrays . asList (1L , 2L ));
170172
171173 assertThat (results ).isNotNull ();
172174 assertThat (results ).isEmpty ();
@@ -182,7 +184,7 @@ public void findAllWithIdsReturnsPartialMatches() {
182184 this .template .put (kurt .getId (), kurt );
183185 this .template .put (eddie .getId (), eddie );
184186
185- Iterable <Person > results = this .repository .findAllById (asList (0L , 1L , 2L , 4L ));
187+ Iterable <Person > results = this .repository .findAllById (Arrays . asList (0L , 1L , 2L , 4L ));
186188
187189 assertThat (results ).isNotNull ();
188190 assertThat (results ).hasSize (2 );
@@ -226,14 +228,14 @@ public void deleteAllById() {
226228
227229 assertThat (this .repository .count ()).isEqualTo (0 );
228230
229- List <Person > people = asList (new Person (1L , "Jon" , "Doe" ), new Person (2L , "Jane" , "Doe" ),
231+ List <Person > people = Arrays . asList (new Person (1L , "Jon" , "Doe" ), new Person (2L , "Jane" , "Doe" ),
230232 new Person (3L , "Cookie" , "Doe" ), new Person (4L , "Pie" , "Doe" ), new Person (5L , "Sour" , "Doe" ));
231233
232234 people .forEach (person -> this .template .put (person .getId (), person ));
233235
234236 assertThat (this .repository .count ()).isEqualTo (5 );
235237
236- this .repository .deleteAllById (asList (1L , 2L ));
238+ this .repository .deleteAllById (Arrays . asList (1L , 2L ));
237239
238240 assertThat (this .repository .count ()).isEqualTo (3L );
239241 assertThat (this .repository .findAll ()) //
@@ -250,7 +252,7 @@ public void saveEntities() {
250252 Person jonBloom = new Person (2L , "Jon" , "Bloom" );
251253 Person juanBlume = new Person (3L , "Juan" , "Blume" );
252254
253- this .repository .saveAll (asList (johnBlum , jonBloom , juanBlume ));
255+ this .repository .saveAll (Arrays . asList (johnBlum , jonBloom , juanBlume ));
254256
255257 assertThat (this .template .getRegion ().size ()).isEqualTo (3 );
256258 assertThat ((Person ) this .template .get (johnBlum .getId ())).isEqualTo (johnBlum );
0 commit comments