code: private void validateJUnit4() throws BuildException {
      try {
        Class<?> clazz = Class.forName("org.junit.runner.Description");
        if (!Serializable.class.isAssignableFrom(clazz)) {
          throw new BuildException("At least JUnit version 4.10 is required on junit4's taskdef classpath.");
        }
      } catch (ClassNotFoundException e) {
        throw new BuildException("JUnit JAR must be added to junit4 taskdef's classpath.");
      }
    }
docs: Validate JUnit4 presence in a concrete version.