System.out.println("Current working dir is " + f.getAbsolutePath());
System.setProperty(AppConfig.JUDDI_CONFIGURATION_FILE_SYSTEM_PROPERTY, f.getAbsolutePath() + "/src/test/resources/juddiv3-enc-aes256.xml");
AppConfig.reloadConfig();
Configuration config =AppConfig.getConfiguration();
Cryptor auth = new AES256Cryptor();
//retrieve it
String pwd = config.getString("juddi.mail.smtp.password");
Assert.assertNotNull(pwd);
//test for encryption
if (config.getBoolean("juddi.mail.smtp.password" + Property.ENCRYPTED_ATTRIBUTE, false))
{
String test=auth.decrypt(pwd);
Assert.assertEquals(test, "password");
}
else
{
Assert.fail("config reports that the setting is not encrypted");