@VisibleForTesting
  void parseWorkflowParameter(
      Map<String, Parameter> workflowParams, Parameter param, String workflowId) {
    parseWorkflowParameter(workflowParams, param, workflowId, new HashSet<>());
  }
@Test
  public void testParseWorkflowParameterWithImplicitToBoolean() {
    BooleanParameter bar = BooleanParameter.builder().name("bar").expression("foo + 'e';").build();
    paramEvaluator.parseWorkflowParameter(
        Collections.singletonMap("foo", StringParameter.builder().expression("'trU'").build()),
        bar,
        "test-workflow");
    assertTrue(bar.getEvaluatedResult());
    assertEquals(
        "Implicitly converted the evaluated result to a boolean for type String",
        bar.getMeta().get("warn"));

    bar = BooleanParameter.builder().name("bar").expression("foo + 'e';").build();
    paramEvaluator.parseWorkflowParameter(
        Collections.singletonMap(
            "foo", StringParameter.builder().evaluatedResult("FAls").evaluatedTime(123L).build()),
        bar,
        "test-workflow");
    assertFalse(bar.getEvaluatedResult());
    assertEquals(
        "Implicitly converted the evaluated result to a boolean for type String",
        bar.getMeta().get("warn"));

    AssertHelper.assertThrows(
        "Can only cast string to boolean",
        IllegalArgumentException.class,
        "Param [bar] is expected to be a Boolean compatible type but is [class java.lang.Double]",
        () ->
            paramEvaluator.parseWorkflowParameter(
                Collections.emptyMap(),
                BooleanParameter.builder().name("bar").expression("0.01;").build(),
                "test-workflow"));

    AssertHelper.assertThrows(
        "Can only cast valid string to boolean",
        IllegalArgumentException.class,
        "Param [bar] is expected to have a Boolean compatible result but is [foo]",
        () ->
            paramEvaluator.parseWorkflowParameter(
                Collections.emptyMap(),
                BooleanParameter.builder().name("bar").expression("'foo';").build(),
                "test-workflow"));
  }