code: private Class<?>[] findValidationGroups(Annotation[] annotations) {
          for (Annotation annotation : annotations) {
              if (annotation.annotationType() == Valid.class) {
                  return DEFAULT_GROUP_ARRAY;
              } else if (annotation.annotationType() == Validated.class) {
                  return  ((Validated) annotation).value();
              }
          }
          return null;
      }
docs: Copied from com.yammer.dropwizard.jersey.jackson.JacksonMessageBodyProvider#findValidationGroups()