PasswordHelper { public String encrypt( String password ) { try { return ENC + passwordService.encrypt( password ); } catch ( PasswordServiceException e ) { Logger.error( this, "Exception encrypting password", e ); throw new RuntimeException( e ); } } PasswordHelper();  PasswordHelper( IPasswordService passwordService ); String getPassword( String input ); String encrypt( String password );  }
@Test public void testEncryptsPassword() throws Exception { PasswordHelper helper = new PasswordHelper( new KettlePasswordService() ); assertEquals( "ENC:Encrypted 2be98afc86aa7f2e4bb18bd63c99dbdde", helper.encrypt( "password" ) ); }