code: protected void collectInitializationErrors(List<Throwable> errors) {
          validatePublicVoidNoArgMethods(BeforeClass.class, true, errors);
          validatePublicVoidNoArgMethods(AfterClass.class, true, errors);
          validateClassRules(errors);
          applyValidators(errors);
      }
docs: Adds to {@code errors} a throwable for each problem noted with the test class (available from {@link #getTestClass()}).
  Default implementation adds an error for each method annotated with
  {@code @BeforeClass} or {@code @AfterClass} that is not
  {@code public static void} with no arguments.