public void publishStartWorkflowEvent(String workflowId, boolean flag) {
    if (flag
        && workflowId != null
        && !workflowId.isEmpty()
        && !IdHelper.isInlineWorkflowId(workflowId)) {
      publisher.publishOrThrow(StartWorkflowJobEvent.create(workflowId));
    }
  }
@Test
  public void testPublishStartWorkflowEvent() {
    workflowHelper.publishStartWorkflowEvent("foo", false);
    Mockito.verify(maestroJobEventPublisher, Mockito.times(0)).publishOrThrow(any());
    workflowHelper.publishStartWorkflowEvent(null, true);
    Mockito.verify(maestroJobEventPublisher, Mockito.times(0)).publishOrThrow(any());
    workflowHelper.publishStartWorkflowEvent("", true);
    Mockito.verify(maestroJobEventPublisher, Mockito.times(0)).publishOrThrow(any());
    workflowHelper.publishStartWorkflowEvent(
        Constants.FOREACH_INLINE_WORKFLOW_PREFIX + "foo", true);
    Mockito.verify(maestroJobEventPublisher, Mockito.times(0)).publishOrThrow(any());
    workflowHelper.publishStartWorkflowEvent("foo", true);
    Mockito.verify(maestroJobEventPublisher, Mockito.times(1)).publishOrThrow(any());
  }