public static File buildJar(String testDir, String className, String code) throws Exception {
    return buildJar(testDir, className, code, testDir);
  }
Create a test jar for testing purpose for a given class name with specified code string: save
the class to a file, compile it, and jar it up. If the code string passed in is null, a bare
empty class will be created and used.
@param testDir   the folder under which to store the test class and jar
@param className the test class name
@param code      the optional test class code, which can be null. If null, a bare empty class
                 will be used
@return the test jar file generated
hbase-common/src/test/java/org/apache/hadoop/hbase/util/ClassLoaderTestHelper.java