Skip to content

Commit f7bcdea

Browse files
committed
Adopt to upgraded dependencies.
Closes #2798
1 parent ac5b395 commit f7bcdea

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilderUnitTests.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ void multiPredicateCriteriaShouldReturnCombinedOnes() {
172172
p.firstname = "foo";
173173
p.age = 2L;
174174

175+
when(cb.and(any(Predicate[].class))).thenReturn(andPredicate);
176+
175177
assertThat(QueryByExamplePredicateBuilder.getPredicate(root, cb, of(p), EscapeCharacter.DEFAULT))
176178
.isEqualTo(andPredicate);
177179

@@ -188,10 +190,12 @@ void orConcatenatesPredicatesIfMatcherSpecifies() {
188190

189191
Example<Person> example = of(person, ExampleMatcher.matchingAny());
190192

193+
when(cb.or(any(Predicate[].class))).thenReturn(orPredicate);
194+
191195
assertThat(QueryByExamplePredicateBuilder.getPredicate(root, cb, example, EscapeCharacter.DEFAULT))
192196
.isEqualTo(orPredicate);
193197

194-
verify(cb, times(1)).or(ArgumentMatchers.any());
198+
verify(cb).or(ArgumentMatchers.any(Predicate[].class));
195199
}
196200

197201
@Test // DATAJPA-1372

0 commit comments

Comments
 (0)