@Test(expected = RepositoryException.class)
  public void testGetTasksByWorkflowNameNoDataSource() throws RepositoryException {
    DataSourceWorkflowRepository repo = new DataSourceWorkflowRepository(null);
    List<WorkflowTask> tasks = repo.getTasksByWorkflowName(null);

    assertThat(tasks, allOf(notNullValue(), hasSize(2)));
  }
  @Test
  public void testGetTasksByWorkflowNameNull() throws RepositoryException {

    DataSourceWorkflowRepository repo = new DataSourceWorkflowRepository(ds);
    List<WorkflowTask> tasks = repo.getTasksByWorkflowName(null);

    assertThat(tasks, nullValue());
  }
  @Test
  public void testGetTaskByWorkflowName() throws RepositoryException {

    DataSourceWorkflowRepository repo = new DataSourceWorkflowRepository(ds);
    List<WorkflowTask> tasks = repo.getTasksByWorkflowName("Test Workflow");

    assertThat(tasks, allOf(notNullValue(), hasSize(2)));

    assertThat(tasks.get(0).getTaskName(), equalTo("Test Task"));

    assertThat(tasks.get(1).getTaskName(), equalTo("Test Task2"));
  }