public void testInputOutput ()
{
EmailEpr email = new EmailEpr(EmailEpr.SMTP_PROTOCOL, "foobar", "25", "me", "letmein");
String tmpDir = System.getProperty("java.io.tmpdir");
EPRManager manager = EPRManager.getInstance(tmpDir);
try
{
manager.saveEPR("MyEmail", email);
EmailEpr loaded = new EmailEpr(manager.loadEPR("MyEmail"));
assertEquals(loaded.getHost().equals("foobar"), true);
assertEquals(loaded.getPassword().equals("letmein"), true);
}
catch (Exception ex)
{
log.error(ex);
fail(ex.toString());
}
finally
{
try
{
manager.removeEPR("MyEmail");
}
catch (Exception ex)
{
}
}