@Test
public void tesGetWorkflowById() throws Exception {

    when(executionDAO.getWorkflow(any(), anyBoolean())).thenReturn(new Workflow());
    Workflow workflow = executionDAOFacade.getWorkflowById("workflowId", true);
    assertNotNull(workflow);
    verify(indexDAO, never()).get(any(), any());
    when(executionDAO.getWorkflow(any(), anyBoolean())).thenReturn(null);
    InputStream stream = ExecutionDAOFacadeTest.class.getResourceAsStream("/test.json");
    byte[] bytes = IOUtils.toByteArray(stream);
    String jsonString = new String(bytes);
    when(indexDAO.get(any(), any())).thenReturn(jsonString);
    workflow = executionDAOFacade.getWorkflowById("workflowId", true);
    assertNotNull(workflow);
    verify(indexDAO, times(1)).get(any(), any());
}