private static boolean isParametersMethod(@NonNull Method method) {
    // A valid parameters method is public static and with @Parameters annotation.
    boolean methodPublicStatic =
      Modifier.isPublic(method.getModifiers()) && Modifier.isStatic(method.getModifiers());
    Parameters[] params = method.getAnnotationsByType(Parameters.class);
    return methodPublicStatic && (params != null && params.length > 0);
  }
Helper method that checks if the input method is a valid JUnit @Parameters method.
@param method Input method.
@return true if the method is a valid JUnit parameters method, false otherwise.
hbase-common/src/test/java/org/apache/hadoop/hbase/HBaseClassTestRule.java