public WorkflowActionResponse activate(String workflowId, String version, User caller) {
    Checks.notNull(
        caller, "caller cannot be null to activate workflow [%s][%s]", workflowId, version);
    WorkflowVersionUpdateJobEvent jobEvent =
        (WorkflowVersionUpdateJobEvent) workflowDao.activate(workflowId, version, caller);
    LOG.info(jobEvent.getLog());
    TimelineEvent event =
        TimelineActionEvent.builder()
            .action(Actions.WorkflowAction.ACTIVATE)
            .author(caller)
            .message(jobEvent.getLog())
            .build();
    return WorkflowActionResponse.from(workflowId, jobEvent.getCurrentActiveVersion(), event);
  }
@Test
  public void testActivate() {
    when(workflowDao.activate("sample-minimal-wf", "1", tester))
        .thenReturn(
            WorkflowVersionUpdateJobEvent.create("sample-minimal-wf", 1L, 0L, tester, "test log"));
    WorkflowActionResponse response = actionHandler.activate("sample-minimal-wf", "1", tester);
    verify(workflowDao, times(1)).activate("sample-minimal-wf", "1", tester);
    assertEquals("sample-minimal-wf", response.getWorkflowId());
    assertEquals(1, response.getWorkflowVersionId());
    assertEquals("test log", response.getTimelineEvent().getMessage());
  }