Removed unused import.
Added job_generator_factory test and fixed a bug in job_generator_factory.