public static TriggerUuids toTriggerUuids(Workflow workflow) {
    TriggerUuids.TriggerUuidsBuilder builder = TriggerUuids.builder();
    if (workflow.getTimeTriggers() != null && !workflow.getTimeTriggers().isEmpty()) {
      builder.timeTriggerUuid(
          IdHelper.createUuid(workflow.getTimeTriggers().toString()).toString());
    }
    if (workflow.getSignalTriggers() != null && !workflow.getSignalTriggers().isEmpty()) {
      builder.signalTriggerUuids(
          IntStream.range(0, workflow.getSignalTriggers().size())
              .boxed()
              .collect(
                  Collectors.toMap(
                      e ->
                          IdHelper.createUuid(workflow.getSignalTriggers().get(e).toString())
                              .toString(),
                      Function.identity())));
    }
    return builder.build();
  }
@Test
  public void testToTriggerUuids() {
    Workflow workflow =
        Workflow.builder()
            .id("test-wf-id")
            .timeTriggers(Collections.singletonList(new CronTimeTrigger()))
            .signalTriggers(Collections.singletonList(new SignalTrigger()))
            .build();
    TriggerUuids triggerUuids = IdHelper.toTriggerUuids(workflow);
    Assert.assertEquals("399e992f-bca3-3cf1-9e1c-f04e7f9ee6f4", triggerUuids.getTimeTriggerUuid());
    Assert.assertEquals(
        Collections.singletonMap("ae3fd022-76e8-3322-b657-0db619b4575f", 0),
        triggerUuids.getSignalTriggerUuids());
  }