### Question:
PigJobDescFactory extends JobDescFactoryBase { @Override String getAppIdFromJobName(String jobName) { if (jobName == null) { return null; } Matcher matcher = scheduledJobnamePattern.matcher(jobName); if (matcher.matches()) { jobName = SCHEDULED_PREFIX + matcher.group(1); } return jobName; }  @Override JobDesc create(QualifiedJobId qualifiedJobId, long submitTimeMillis,
      Configuration jobConf); static long getScriptStartTimeFromLogfileName(String pigLogfile); static final String SCHEDULED_PREFIX; }### Answer:
@Test public void testJobNameToBatchDesc() { PigJobDescFactory pigFactory = new PigJobDescFactory(); for (String[] inputOuput : testJobNames) { String input = inputOuput[0]; String expected = inputOuput[1]; String found = pigFactory.getAppIdFromJobName(input); assertEquals("Unexpected result found when parsing jobName=" + input, expected, found); } }