@Override
  public String encode( String rawPassword ) {
    return encode( rawPassword, true );
  }
@Test
  public void testEncode2() throws KettleValueException {
    KettleTwoWayPasswordEncoder encoder = new KettleTwoWayPasswordEncoder();

    String encryption;

    encryption = encoder.encode( null );
    assertTrue( "Encrypted ".equals( encryption ) );

    encryption = encoder.encode( "" );
    assertTrue( "Encrypted ".equals( encryption ) );

    encryption = encoder.encode( "String" );
    assertTrue( "Encrypted 2be98afc86aa7f2e4cb799d64cc9ba1dd".equals( encryption ) );

    encryption = encoder.encode( " ${VAR} String" );
    assertTrue( " ${VAR} String".equals( encryption ) );

    encryption = encoder.encode( " %%VAR%% String" );
    assertTrue( " %%VAR%% String".equals( encryption ) );

    encryption = encoder.encode( " %% VAR String" );
    assertTrue( "Encrypted 2be988fed4f87a4a599599d64cc9ba1dd".equals( encryption ) );

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