@Test
public void testFetchNumExecutableFlows() throws Exception {

  final ExecutableFlow flow1 = TestUtils.createTestExecutableFlow("exectest1", "exec1");
  flow1.setStatus(Status.PREPARING);
  this.executionFlowDao.uploadExecutableFlow(flow1);
  final ExecutableFlow flow2 = TestUtils.createTestExecutableFlow("exectest1", "exec2");
  flow2.setStatus(Status.RUNNING);
  this.executionFlowDao.uploadExecutableFlow(flow2);
  final ExecutableFlow flow2b = TestUtils.createTestExecutableFlow("exectest1", "exec2");
  flow2b.setStatus(Status.FAILED);
  this.executionFlowDao.uploadExecutableFlow(flow2b);
  final int count = this.numExecutionsDao.fetchNumExecutableFlows();
  assertThat(count).isEqualTo(3);
  final int flow2Count = this.numExecutionsDao
      .fetchNumExecutableFlows(1, "derived-member-data-2");
  assertThat(flow2Count).isEqualTo(2);
}