@Test
public void fetchFlowHistory() throws Exception {

  final ExecutableFlow flow = createTestFlow();
  this.executionFlowDao.uploadExecutableFlow(flow);
  final List<ExecutableFlow> flowList1 = this.executionFlowDao.fetchFlowHistory(0, 2);
  assertThat(flowList1.size()).isEqualTo(1);
  final List<ExecutableFlow> flowList2 = this.executionFlowDao
      .fetchFlowHistory(flow.getProjectId(), flow.getId(), 0, 2);
  assertThat(flowList2.size()).isEqualTo(1);
  final ExecutableFlow fetchFlow =
      this.executionFlowDao.fetchExecutableFlow(flow.getExecutionId());
  assertTwoFlowSame(flowList1.get(0), flowList2.get(0));
  assertTwoFlowSame(flowList1.get(0), fetchFlow);
}