@classmethod
def _createForTesting(cls, sparkContext):
    """(Internal use only) Create a new HiveContext for testing.

        All test code that touches HiveContext *must* go through this method. Otherwise,
        you may end up launching multiple derby instances and encounter with incredibly
        confusing error messages.
        """
    jsc = sparkContext._jsc.sc()
    jtestHive = (sparkContext._jvm.org.apache.spark.sql.hive.test.
        TestHiveContext(jsc, False))
    return cls(sparkContext, jtestHive)
