public void enrichWorkflowDefinition(WorkflowDefinition workflowDefinition) {
    WorkflowDefinitionExtras enrichedWorkflowDefinition = new WorkflowDefinitionExtras();
    enrichParams(workflowDefinition, enrichedWorkflowDefinition);
    enrichNextRunDate(workflowDefinition, enrichedWorkflowDefinition);
    workflowDefinition.setEnrichedExtras(enrichedWorkflowDefinition);
  }
@Test
  public void testEnrichWorkflowDefinitionParams() {
    Map<String, ParamDefinition> stepParams =
        Collections.singletonMap("sp1", ParamDefinition.buildParamDefinition("sp1", "sv1"));
    Map<String, ParamDefinition> workflowParams =
        Collections.singletonMap("wp1", ParamDefinition.buildParamDefinition("wp1", "wv1"));
    when(paramsManager.generateStaticStepParamDefs(any(), any(), any())).thenReturn(stepParams);
    when(paramsManager.generatedStaticWorkflowParamDefs(any())).thenReturn(workflowParams);
    workflowEnrichmentHelper.enrichWorkflowDefinition(definition);
    Assert.assertNotNull(definition.getEnrichedExtras());
    Assert.assertNull(definition.getEnrichedExtras().getNextExecutionTime());
    WorkflowDefinitionExtras enriched = definition.getEnrichedExtras();
    Assert.assertEquals("wv1", enriched.getWorkflowParams().get("wp1").getValue());
    Assert.assertEquals("sv1", enriched.getStepParams().get("job1").get("sp1").getValue());
  }