public static final String encryptPasswordIfNotUsingVariables( String password ) {

    return encoder.encode( password, true );
  }
@Test
  public void testEncryptPasswordIfNotUsingVariables() throws KettleValueException {
    String encryption;

    encryption = Encr.encryptPasswordIfNotUsingVariables( null );
    assertTrue( "Encrypted ".equals( encryption ) );

    encryption = Encr.encryptPasswordIfNotUsingVariables( "" );
    assertTrue( "Encrypted ".equals( encryption ) );

    encryption = Encr.encryptPasswordIfNotUsingVariables( "String" );
    assertTrue( "Encrypted 2be98afc86aa7f2e4cb799d64cc9ba1dd".equals( encryption ) );

    encryption = Encr.encryptPasswordIfNotUsingVariables( " ${VAR} String" );
    assertTrue( " ${VAR} String".equals( encryption ) );

    encryption = Encr.encryptPasswordIfNotUsingVariables( " %%VAR%% String" );
    assertTrue( " %%VAR%% String".equals( encryption ) );

    encryption = Encr.encryptPasswordIfNotUsingVariables( " %% VAR String" );
    assertTrue( "Encrypted 2be988fed4f87a4a599599d64cc9ba1dd".equals( encryption ) );

    encryption = Encr.encryptPasswordIfNotUsingVariables( "${%%$$$$" );
    assertTrue( "Encrypted 2be98afc86aa7f2e4ef02eb359ad6eb9e".equals( encryption ) );
  }