public boolean isDeletionInitialized(String workflowId, long internalId) {
    return getWorkflowDeletionStage(workflowId, internalId) == Stage.DELETING_VERSIONS;
  }
@Test
  public void testIsDeletionInitialized() throws Exception {
    WorkflowDefinition wfd = loadWorkflow(TEST_WORKFLOW_ID1);
    workflowDao.addWorkflowDefinition(wfd, wfd.getPropertiesSnapshot().extractProperties());
    reset(publisher);
    ArgumentCaptor<DeleteWorkflowJobEvent> argumentCaptor =
        ArgumentCaptor.forClass(DeleteWorkflowJobEvent.class);
    workflowDao.deleteWorkflow(TEST_WORKFLOW_ID1, User.create("tester"));
    Mockito.verify(publisher, times(1)).publishOrThrow(argumentCaptor.capture(), any());

    DeleteWorkflowJobEvent deleteWorkflowJobEvent = argumentCaptor.getValue();
    assertEquals(TEST_WORKFLOW_ID1, deleteWorkflowJobEvent.getWorkflowId());
    assertEquals("tester", deleteWorkflowJobEvent.getAuthor().getName());
    assertTrue(
        deletionDao.isDeletionInitialized(
            TEST_WORKFLOW_ID1, deleteWorkflowJobEvent.getInternalId()));

    AssertHelper.assertThrows(
        "Workflow is not deleted.",
        MaestroNotFoundException.class,
        "Cannot get the deletion status for workflow",
        () -> deletionDao.isDeletionInitialized(TEST_WORKFLOW_ID1, 12345L));
  }