@@ -105,7 +105,7 @@ public void callbackOnSave() {
105
105
SampleEntity second = new SampleEntity (23L , "Alfred E." );
106
106
SampleEntity third = new SampleEntity (23L , "Neumann" );
107
107
108
- when (callbacks .callback (any (Class .class ), any (), any ())).thenReturn (second , third );
108
+ when (callbacks .callback (any (Class .class ), any (), any (Object . class ))).thenReturn (second , third );
109
109
110
110
SampleEntity last = template .save (first );
111
111
@@ -119,7 +119,7 @@ public void callbackOnSave() {
119
119
void savePreparesInstanceWithInitialVersion_onInsert () {
120
120
121
121
EntityWithVersion entity = new EntityWithVersion (1L );
122
- when (callbacks .callback (any (), any (), any ())).thenReturn (entity , entity );
122
+ when (callbacks .callback (any (), any (), any (Object . class ))).thenReturn (entity , entity );
123
123
124
124
template .save (entity );
125
125
@@ -134,7 +134,7 @@ void savePreparesInstanceWithInitialVersion_onInsert() {
134
134
void savePreparesInstanceWithInitialVersion_onInsert_whenVersionPropertyIsImmutable () {
135
135
136
136
EntityWithImmutableVersion entity = new EntityWithImmutableVersion (1L , null );
137
- when (callbacks .callback (any (), any (), any ())).thenReturn (entity , entity );
137
+ when (callbacks .callback (any (), any (), any (Object . class ))).thenReturn (entity , entity );
138
138
139
139
template .save (entity );
140
140
@@ -149,7 +149,7 @@ void savePreparesInstanceWithInitialVersion_onInsert_whenVersionPropertyIsImmuta
149
149
void savePreparesInstanceWithInitialVersion_onInsert_whenVersionPropertyIsPrimitiveType () {
150
150
151
151
EntityWithPrimitiveVersion entity = new EntityWithPrimitiveVersion (1L );
152
- when (callbacks .callback (any (), any (), any ())).thenReturn (entity , entity );
152
+ when (callbacks .callback (any (), any (), any (Object . class ))).thenReturn (entity , entity );
153
153
154
154
template .save (entity );
155
155
@@ -164,7 +164,7 @@ void savePreparesInstanceWithInitialVersion_onInsert_whenVersionPropertyIsPrimit
164
164
void savePreparesInstanceWithInitialVersion_onInsert__whenVersionPropertyIsImmutableAndPrimitiveType () {
165
165
166
166
EntityWithImmutablePrimitiveVersion entity = new EntityWithImmutablePrimitiveVersion (1L , 0L );
167
- when (callbacks .callback (any (), any (), any ())).thenReturn (entity , entity );
167
+ when (callbacks .callback (any (), any (), any (Object . class ))).thenReturn (entity , entity );
168
168
169
169
template .save (entity );
170
170
@@ -182,7 +182,7 @@ void savePreparesChangeWithPreviousVersion_onUpdate() {
182
182
when (dataAccessStrategy .updateWithVersion (any (), any (), any ())).thenReturn (true );
183
183
EntityWithVersion entity = new EntityWithVersion (1L );
184
184
entity .setVersion (1L );
185
- when (callbacks .callback (any (), any (), any ())).thenReturn (entity , entity );
185
+ when (callbacks .callback (any (), any (), any (Object . class ))).thenReturn (entity , entity );
186
186
187
187
template .save (entity );
188
188
@@ -199,7 +199,7 @@ void savePreparesInstanceWithNextVersion_onUpdate() {
199
199
when (dataAccessStrategy .updateWithVersion (any (), any (), any ())).thenReturn (true );
200
200
EntityWithVersion entity = new EntityWithVersion (1L );
201
201
entity .setVersion (1L );
202
- when (callbacks .callback (any (), any (), any ())).thenReturn (entity , entity );
202
+ when (callbacks .callback (any (), any (), any (Object . class ))).thenReturn (entity , entity );
203
203
204
204
template .save (entity );
205
205
@@ -215,7 +215,7 @@ void savePreparesInstanceWithNextVersion_onUpdate_whenVersionPropertyIsImmutable
215
215
216
216
when (dataAccessStrategy .updateWithVersion (any (), any (), any ())).thenReturn (true );
217
217
EntityWithImmutableVersion entity = new EntityWithImmutableVersion (1L , 1L );
218
- when (callbacks .callback (any (), any (), any ())).thenReturn (entity , entity );
218
+ when (callbacks .callback (any (), any (), any (Object . class ))).thenReturn (entity , entity );
219
219
220
220
template .save (entity );
221
221
@@ -229,7 +229,7 @@ void savePreparesInstanceWithNextVersion_onUpdate_whenVersionPropertyIsImmutable
229
229
void deletePreparesChangeWithPreviousVersion_onDeleteByInstance () {
230
230
231
231
EntityWithImmutableVersion entity = new EntityWithImmutableVersion (1L , 1L );
232
- when (callbacks .callback (any (), any (), any ())).thenReturn (entity , entity );
232
+ when (callbacks .callback (any (), any (), any (Object . class ))).thenReturn (entity , entity );
233
233
234
234
template .delete (entity , EntityWithImmutableVersion .class );
235
235
@@ -265,10 +265,10 @@ public void callbackOnLoad() {
265
265
266
266
when (dataAccessStrategy .findAll (SampleEntity .class )).thenReturn (asList (alfred1 , neumann1 ));
267
267
268
- when (callbacks .callback (any (Class .class ), eq (alfred1 ), any ())).thenReturn (alfred2 );
269
- when (callbacks .callback (any (Class .class ), eq (alfred2 ), any ())).thenReturn (alfred2 );
270
- when (callbacks .callback (any (Class .class ), eq (neumann1 ), any ())).thenReturn (neumann2 );
271
- when (callbacks .callback (any (Class .class ), eq (neumann2 ), any ())).thenReturn (neumann2 );
268
+ when (callbacks .callback (any (Class .class ), eq (alfred1 ), any (Object []. class ))).thenReturn (alfred2 );
269
+ when (callbacks .callback (any (Class .class ), eq (alfred2 ), any (Object []. class ))).thenReturn (alfred2 );
270
+ when (callbacks .callback (any (Class .class ), eq (neumann1 ), any (Object []. class ))).thenReturn (neumann2 );
271
+ when (callbacks .callback (any (Class .class ), eq (neumann2 ), any (Object []. class ))).thenReturn (neumann2 );
272
272
273
273
Iterable <SampleEntity > all = template .findAll (SampleEntity .class );
274
274
@@ -289,10 +289,10 @@ public void callbackOnLoadSorted() {
289
289
290
290
when (dataAccessStrategy .findAll (SampleEntity .class , Sort .by ("name" ))).thenReturn (asList (alfred1 , neumann1 ));
291
291
292
- when (callbacks .callback (any (Class .class ), eq (alfred1 ), any ())).thenReturn (alfred2 );
293
- when (callbacks .callback (any (Class .class ), eq (alfred2 ), any ())).thenReturn (alfred2 );
294
- when (callbacks .callback (any (Class .class ), eq (neumann1 ), any ())).thenReturn (neumann2 );
295
- when (callbacks .callback (any (Class .class ), eq (neumann2 ), any ())).thenReturn (neumann2 );
292
+ when (callbacks .callback (any (Class .class ), eq (alfred1 ), any (Object []. class ))).thenReturn (alfred2 );
293
+ when (callbacks .callback (any (Class .class ), eq (alfred2 ), any (Object []. class ))).thenReturn (alfred2 );
294
+ when (callbacks .callback (any (Class .class ), eq (neumann1 ), any (Object []. class ))).thenReturn (neumann2 );
295
+ when (callbacks .callback (any (Class .class ), eq (neumann2 ), any (Object []. class ))).thenReturn (neumann2 );
296
296
297
297
Iterable <SampleEntity > all = template .findAll (SampleEntity .class , Sort .by ("name" ));
298
298
@@ -315,10 +315,10 @@ public void callbackOnLoadPaged() {
315
315
316
316
when (dataAccessStrategy .findAll (SampleEntity .class , PageRequest .of (0 , 20 ))).thenReturn (asList (alfred1 , neumann1 ));
317
317
318
- when (callbacks .callback (any (Class .class ), eq (alfred1 ), any ())).thenReturn (alfred2 );
319
- when (callbacks .callback (any (Class .class ), eq (alfred2 ), any ())).thenReturn (alfred2 );
320
- when (callbacks .callback (any (Class .class ), eq (neumann1 ), any ())).thenReturn (neumann2 );
321
- when (callbacks .callback (any (Class .class ), eq (neumann2 ), any ())).thenReturn (neumann2 );
318
+ when (callbacks .callback (any (Class .class ), eq (alfred1 ), any (Object []. class ))).thenReturn (alfred2 );
319
+ when (callbacks .callback (any (Class .class ), eq (alfred2 ), any (Object []. class ))).thenReturn (alfred2 );
320
+ when (callbacks .callback (any (Class .class ), eq (neumann1 ), any (Object []. class ))).thenReturn (neumann2 );
321
+ when (callbacks .callback (any (Class .class ), eq (neumann2 ), any (Object []. class ))).thenReturn (neumann2 );
322
322
323
323
Iterable <SampleEntity > all = template .findAll (SampleEntity .class , PageRequest .of (0 , 20 ));
324
324
@@ -334,7 +334,8 @@ public void callbackOnLoadPaged() {
334
334
@ AllArgsConstructor
335
335
private static class SampleEntity {
336
336
337
- @ Column ("id1" ) @ Id private Long id ;
337
+ @ Column ("id1" )
338
+ @ Id private Long id ;
338
339
339
340
private String name ;
340
341
}
@@ -343,7 +344,8 @@ private static class SampleEntity {
343
344
@ RequiredArgsConstructor
344
345
private static class EntityWithVersion {
345
346
346
- @ Column ("id1" ) @ Id private final Long id ;
347
+ @ Column ("id1" )
348
+ @ Id private final Long id ;
347
349
348
350
@ Version private Long version ;
349
351
}
@@ -352,7 +354,8 @@ private static class EntityWithVersion {
352
354
@ RequiredArgsConstructor
353
355
private static class EntityWithImmutableVersion {
354
356
355
- @ Column ("id1" ) @ Id private final Long id ;
357
+ @ Column ("id1" )
358
+ @ Id private final Long id ;
356
359
357
360
@ Version private final Long version ;
358
361
}
@@ -361,7 +364,8 @@ private static class EntityWithImmutableVersion {
361
364
@ RequiredArgsConstructor
362
365
private static class EntityWithPrimitiveVersion {
363
366
364
- @ Column ("id1" ) @ Id private final Long id ;
367
+ @ Column ("id1" )
368
+ @ Id private final Long id ;
365
369
366
370
@ Version private long version ;
367
371
}
@@ -370,7 +374,8 @@ private static class EntityWithPrimitiveVersion {
370
374
@ RequiredArgsConstructor
371
375
private static class EntityWithImmutablePrimitiveVersion {
372
376
373
- @ Column ("id1" ) @ Id private final Long id ;
377
+ @ Column ("id1" )
378
+ @ Id private final Long id ;
374
379
375
380
@ Version private final long version ;
376
381
}
0 commit comments