@Test
  public void cascadingConstraintAtMethodReturnValue() throws Exception {

    BeanMetaData<CustomerRepository> metaData = setupBeanMetaData(CustomerRepository.class);

    Method method = CustomerRepository.class.getMethod("findCustomerByName", String.class);
    MethodMetaData methodMetaData = metaData.getMetaDataFor(method);

    assertEquals(methodMetaData.getParameterTypes(), method.getParameterTypes());
    assertTrue(methodMetaData.isCascading());
    assertIterableSize(methodMetaData, 0);
  }
  @Test
  public void nonCascadingConstraintAtMethodReturnValue() throws Exception {

    BeanMetaData<CustomerRepository> metaData = setupBeanMetaData(CustomerRepository.class);

    Method method = CustomerRepository.class.getMethod("baz");
    MethodMetaData methodMetaData = metaData.getMetaDataFor(method);

    assertEquals(methodMetaData.getParameterTypes(), method.getParameterTypes());
    assertFalse(methodMetaData.isCascading());
    ConstraintDescriptorImpl<? extends Annotation> descriptor =
        methodMetaData.iterator().next().getDescriptor();
    assertEquals(descriptor.getAnnotation().annotationType(), Min.class);
    assertEquals(descriptor.getAttributes().get("value"), 10L);
  }