public void testDataSourceRepo() throws SQLException, RepositoryException {
DataSourceWorkflowRepository repo = new DataSourceWorkflowRepository(ds);
//test id 1
WorkflowCondition wc = repo.getWorkflowConditionById("1");
assertEquals(wc.getConditionName(), "CheckCond");
WorkflowConditionInstance condInst = GenericWorkflowObjectFactory.getConditionObjectFromClassName(wc.getConditionInstanceClassName());
Metadata m = new Metadata();
m.addMetadata("Met1", "Val1");
m.addMetadata("Met2", "Val2");
m.addMetadata("Met3", "Val3");
assertTrue(condInst.evaluate(m, wc.getTaskConfig()));
//test id 2
wc = repo.getWorkflowConditionById("2");
assertEquals(wc.getConditionName(), "FalseCond");
condInst = GenericWorkflowObjectFactory.getConditionObjectFromClassName(wc.getConditionInstanceClassName());
assertFalse(condInst.evaluate(m, wc.getTaskConfig()));
//test id 3
wc = repo.getWorkflowConditionById("3");
assertEquals(wc.getConditionName(), "TrueCond");
condInst = GenericWorkflowObjectFactory.getConditionObjectFromClassName(wc.getConditionInstanceClassName());
assertTrue(condInst.evaluate(m, wc.getTaskConfig()));
}