private ConstraintValidatorContext context = Mockito.mock(ConstraintValidatorContext.class);
@Test
public void testThatNullIsValid() {
StellaMinElementsValidator validator = new StellaMinElementsValidator();
validator.initialize(new Mirror().on(AnnotatedModel.class).reflect().annotation(MinElements.class).atField("c"));
Assert.assertTrue(validator.isValid(null,context));
}
@Test(expected = IllegalStateException.class)
public void testThatThrowsExceptionIfAnnotatedElementIsNotACollectionOrArray() {