@Override
  public String environmentSubstitute( String aString ) {
    if ( aString == null || aString.length() == 0 ) {
      return aString;
    }

    return StringUtil.environmentSubstitute( aString, properties );
  }
@Test
  public void testEnvironmentSubstitute() {
    Variables vars = new Variables();
    vars.setVariable( "VarOne", "DataOne" );
    vars.setVariable( "VarTwo", "DataTwo" );

    assertNull( vars.environmentSubstitute( (String) null ) );
    assertEquals( "", vars.environmentSubstitute( "" ) );
    assertEquals( "DataTwo", vars.environmentSubstitute( "${VarTwo}" ) );
    assertEquals( "DataTwoEnd", vars.environmentSubstitute( "${VarTwo}End" ) );

    assertEquals( 0, vars.environmentSubstitute( new String[0] ).length );
    assertArrayEquals( new String[]{ "DataOne", "TheDataOne" },
      vars.environmentSubstitute( new String[]{ "${VarOne}", "The${VarOne}" } ) );
  }