3939
4040import org .junit .jupiter .api .BeforeEach ;
4141import org .junit .jupiter .api .Test ;
42+ import org .junit .jupiter .api .condition .DisabledOnJre ;
43+ import org .junit .jupiter .api .condition .JRE ;
4244import org .junit .jupiter .api .extension .ExtendWith ;
4345import org .mockito .ArgumentMatchers ;
4446import org .mockito .Mock ;
4547import org .mockito .junit .jupiter .MockitoExtension ;
4648import org .mockito .junit .jupiter .MockitoSettings ;
4749import org .mockito .quality .Strictness ;
48-
4950import org .springframework .data .domain .Example ;
5051import org .springframework .data .domain .ExampleMatcher ;
5152import org .springframework .data .domain .ExampleMatcher .GenericPropertyMatcher ;
@@ -90,19 +91,16 @@ class QueryByExamplePredicateBuilderUnitTests {
9091 void setUp () {
9192
9293 personIdAttribute = new SingularAttributeStub <>("id" , PersistentAttributeType .BASIC , Long .class );
93- personFirstnameAttribute = new SingularAttributeStub <>("firstname" , PersistentAttributeType .BASIC ,
94- String .class );
94+ personFirstnameAttribute = new SingularAttributeStub <>("firstname" , PersistentAttributeType .BASIC , String .class );
9595 personAgeAttribute = new SingularAttributeStub <>("age" , PersistentAttributeType .BASIC , Long .class );
96- personFatherAttribute = new SingularAttributeStub <>("father" , PersistentAttributeType .MANY_TO_ONE ,
97- Person .class , personEntityType );
98- personSkillAttribute = new SingularAttributeStub <>("skill" , PersistentAttributeType .EMBEDDED ,
99- Skill .class , skillEntityType );
100- personAddressAttribute = new SingularAttributeStub <>("address" , PersistentAttributeType .EMBEDDED ,
101- Address .class );
102- skillNameAttribute = new SingularAttributeStub <>("name" , PersistentAttributeType .BASIC ,
103- String .class );
104- skillNestedAttribute = new SingularAttributeStub <>("nested" , PersistentAttributeType .MANY_TO_ONE ,
105- Skill .class , skillEntityType );
96+ personFatherAttribute = new SingularAttributeStub <>("father" , PersistentAttributeType .MANY_TO_ONE , Person .class ,
97+ personEntityType );
98+ personSkillAttribute = new SingularAttributeStub <>("skill" , PersistentAttributeType .EMBEDDED , Skill .class ,
99+ skillEntityType );
100+ personAddressAttribute = new SingularAttributeStub <>("address" , PersistentAttributeType .EMBEDDED , Address .class );
101+ skillNameAttribute = new SingularAttributeStub <>("name" , PersistentAttributeType .BASIC , String .class );
102+ skillNestedAttribute = new SingularAttributeStub <>("nested" , PersistentAttributeType .MANY_TO_ONE , Skill .class ,
103+ skillEntityType );
106104
107105 personEntityAttribtues = new LinkedHashSet <>();
108106 personEntityAttribtues .add (personIdAttribute );
@@ -169,6 +167,7 @@ void singleElementCriteriaShouldJustReturnIt() {
169167 verify (cb , times (1 )).equal (any (Expression .class ), eq ("foo" ));
170168 }
171169
170+ @ DisabledOnJre ({ JRE .JAVA_11 , JRE .JAVA_17 })
172171 @ Test // DATAJPA-218
173172 void multiPredicateCriteriaShouldReturnCombinedOnes () {
174173
@@ -183,6 +182,7 @@ void multiPredicateCriteriaShouldReturnCombinedOnes() {
183182 verify (cb , times (1 )).equal (any (Expression .class ), eq (2L ));
184183 }
185184
185+ @ DisabledOnJre ({ JRE .JAVA_11 , JRE .JAVA_17 })
186186 @ Test // DATAJPA-879
187187 void orConcatenatesPredicatesIfMatcherSpecifies () {
188188
@@ -306,13 +306,13 @@ static class SingularAttributeStub<X, T> implements SingularAttribute<X, T> {
306306 private Class <T > javaType ;
307307 private Type <T > type ;
308308
309- SingularAttributeStub (String name ,
310- javax . persistence . metamodel . Attribute . PersistentAttributeType attributeType , Class <T > javaType ) {
309+ SingularAttributeStub (String name , javax . persistence . metamodel . Attribute . PersistentAttributeType attributeType ,
310+ Class <T > javaType ) {
311311 this (name , attributeType , javaType , null );
312312 }
313313
314- SingularAttributeStub (String name ,
315- javax . persistence . metamodel . Attribute . PersistentAttributeType attributeType , Class <T > javaType , Type <T > type ) {
314+ SingularAttributeStub (String name , javax . persistence . metamodel . Attribute . PersistentAttributeType attributeType ,
315+ Class <T > javaType , Type <T > type ) {
316316 this .name = name ;
317317 this .attributeType = attributeType ;
318318 this .javaType = javaType ;
0 commit comments