HadoopWorkflowUtils { public static String generateSpringBatchJobName(final WorkflowArtifacts artifacts) { return springHadoopJobPrefix + artifacts.getWorkflowDescriptor().getFilename(); }  static WorkflowArtifacts getWorkflowArtifacts(File workflowArtifactFolder); static String[] getWorkflowDescriptor(File workflowArtifactFolder); static boolean isValidWorkflow(List<FileInfo> files); static URL[] getWorkflowLibararies(File workflowArtifactFolder); static ClassLoader getWorkflowClassLoader(File workflowArtifactFolder); static boolean isSpringBatchJob(ApplicationContext context, WorkflowArtifacts artifacts); static void createAndRegisterSpringBatchJob(ApplicationContext context, final WorkflowArtifacts artifacts); static String generateSpringBatchJobName(final WorkflowArtifacts artifacts); static void unregisterSpringBatchJob(ApplicationContext context, String springBatchJobName); static String getWorkflowDescriptor(final WorkflowArtifacts artifacts); static void processAndRegisterWorkflow(File parentFolder, ApplicationContext context); static WorkflowArtifacts processUploadedFile(final File parentFolder); static void registerSpringBatchJob(WorkflowArtifacts artifacts, ApplicationContext context); static String fileURLPrefix; static String springHadoopJobPrefix; static String springHadoopTaskName; }
@Test public void testGenerateSpringBatchJobName() { File folder = new File( "src/test/resources/org/springframework/data/hadoop/admin/util/testWithoutSpringBatchJob"); WorkflowArtifacts artifacts = HadoopWorkflowUtils.getWorkflowArtifacts(folder); String name = HadoopWorkflowUtils.generateSpringBatchJobName(artifacts); Assert.assertNotNull(name); Assert.assertEquals("spring-hadoop-job-context.xml", name); }