);
}
@Test
public void testFindConstraintsLookingAt() {
CrossParameterDescriptor descriptor = getMethodDescriptor(
CustomerRepositoryExt.class,
"methodWithCrossParameterConstraint",
DateMidnight.class,
DateMidnight.class
).getCrossParameterDescriptor();
Set<ConstraintDescriptor<?>> constraintDescriptors = descriptor.findConstraints()
.lookingAt( Scope.LOCAL_ELEMENT )
.getConstraintDescriptors();
assertEquals( constraintDescriptors.size(), 0 );
constraintDescriptors = descriptor.findConstraints()
.lookingAt( Scope.HIERARCHY )
.getConstraintDescriptors();
assertEquals( constraintDescriptors.size(), 1 );
assertEquals(
constraintDescriptors.iterator().next().getAnnotation().annotationType(),