@Test
public void testPendingByCorrelationId() {

    WorkflowDef def = new WorkflowDef();
    def.setName("pending_count_correlation_jtest");
    Workflow workflow = createTestWorkflow();
    workflow.setWorkflowDefinition(def);
    generateWorkflows(workflow, 10);
    List<Workflow> bycorrelationId = getExecutionDAO().getWorkflowsByCorrelationId("pending_count_correlation_jtest", "corr001", true);
    assertNotNull(bycorrelationId);
    assertEquals(10, bycorrelationId.size());
}