@Test public void testGetObject() throws Exception { File parentDir = new File(System.getProperty("java.io.tmpdir", "/tmp"), Constant.WORKFLOW_LOCATION); logger.info("parent dir:" + parentDir.getAbsolutePath()); File target = new File(parentDir, "wordcount"); if (target.exists()) { target.delete(); } Files.createParentDirs(target); File file = new File("src/test/resources/org/springframework/data/hadoop/admin/workflow/support/copy"); File to = null; for (File f : file.listFiles()) { to = new File(target, f.getName()); Files.createParentDirs(to); to.createNewFile(); Files.copy(f, to); } File folder = to.getParentFile(); HadoopWorkflowUtils.processUploadedFile(folder); workflowResourceFactoryBean.setBaseWorkflowDescriptorDir(""); workflowResourceFactoryBean.afterPropertiesSet(); WorkflowArtifacts[] artifacts = workflowResourceFactoryBean.getObject(); Assert.assertEquals(1, artifacts.length); }
@Override public WorkflowArtifacts[] getObject() throws Exception { return workflowArtifacts; }
FileSystemWorkflowResourceFactoryBean implements FactoryBean<Object>, InitializingBean { @Override public WorkflowArtifacts[] getObject() throws Exception { return workflowArtifacts; } }
FileSystemWorkflowResourceFactoryBean implements FactoryBean<Object>, InitializingBean { @Override public WorkflowArtifacts[] getObject() throws Exception { return workflowArtifacts; }  }
FileSystemWorkflowResourceFactoryBean implements FactoryBean<Object>, InitializingBean { @Override public WorkflowArtifacts[] getObject() throws Exception { return workflowArtifacts; }  @Override WorkflowArtifacts[] getObject(); @Override Class<?> getObjectType(); @Override boolean isSingleton(); @Override void afterPropertiesSet(); String getBaseWorkflowDescriptorDir(); void setBaseWorkflowDescriptorDir(String baseWorkflowDescriptorDir); }
FileSystemWorkflowResourceFactoryBean implements FactoryBean<Object>, InitializingBean { @Override public WorkflowArtifacts[] getObject() throws Exception { return workflowArtifacts; }  @Override WorkflowArtifacts[] getObject(); @Override Class<?> getObjectType(); @Override boolean isSingleton(); @Override void afterPropertiesSet(); String getBaseWorkflowDescriptorDir(); void setBaseWorkflowDescriptorDir(String baseWorkflowDescriptorDir);  }