PackagedWorkflowRepository implements WorkflowRepository { @Override public WorkflowCondition getWorkflowConditionById(String conditionId) throws RepositoryException { return this.conditions.get(conditionId); } PackagedWorkflowRepository(List<File> files); @Override Workflow getWorkflowByName(String workflowName); @Override Workflow getWorkflowById(String workflowId); @Override List getWorkflows(); @Override List getTasksByWorkflowId(String workflowId); @Override List getTasksByWorkflowName(String workflowName); @Override List getWorkflowsForEvent(String eventName); @Override List getConditionsByTaskName(String taskName); @Override List getConditionsByTaskId(String taskId); @Override WorkflowTaskConfiguration getConfigurationByTaskId(String taskId); @Override WorkflowTask getWorkflowTaskById(String taskId); @Override WorkflowCondition getWorkflowConditionById(String conditionId); @Override List getRegisteredEvents(); @Override String addTask(WorkflowTask task); @Override String addWorkflow(Workflow workflow); @Override List<WorkflowCondition> getConditionsByWorkflowId(String workflowId); @Override WorkflowTask getTaskById(String taskId);  }
@Test public void testGetConditionTimeout(){ WorkflowCondition cond = null; try{ cond = this.repo.getWorkflowConditionById("urn:npp:MOA_IASI_L1C_Daily"); } catch(Exception e){ LOG.log(Level.SEVERE, e.getMessage()); fail(e.getMessage()); } assertNotNull(cond); assertEquals(30L, cond.getTimeoutSeconds()); }
@Test public void testGetOptional(){ WorkflowCondition cond = null; try{ cond = this.repo.getWorkflowConditionById("urn:npp:MOA_ORBITS_FileBased"); } catch(Exception e){ LOG.log(Level.SEVERE, e.getMessage()); fail(e.getMessage()); } assertNotNull(cond); assertEquals(true, cond.isOptional()); }