public static void resetFactory(Class<? extends Factory> factoryClass) {
    if (factoryClass != null){
      factoryClassName = factoryClass.getName();
    } else {
      factoryClassName = null;
    }
    factoryInstance = null;
  }
Package scoped method used for testing - allows resetting the ReplicationTaskFactory used
@param factoryClass The new ReplicationTaskFactory to use.
hcatalog/webhcat/java-client/src/main/java/org/apache/hive/hcatalog/api/repl/ReplicationTask.java