public static String substVars(String val, PropertyContainer pc1) {
    return substVars(val, pc1, null);
  }
@Test(timeout = 1000)
  public void detectCircularReferences3() {
    context.putProperty("A", "${B}");
    context.putProperty("B", "${C}");
    context.putProperty("C", "${A}");

    expectedException.expect(IllegalArgumentException.class);
    expectedException.expectMessage("Circular variable reference detected while parsing input [${B} --> ${C} --> ${A} --> ${B}]");
    OptionHelper.substVars("${B} ", context);
  }