// ====================================================================
// Test Exceptions
// ====================================================================
// reset the mail class
MockEmailConcrete anotherEmail = new MockEmailConcrete();
// bad encoding
try
{
// set a dodgy encoding scheme
anotherEmail.setFrom("me@home.com", "me@home.com", "bad.encoding\uc5ec\n");
fail("setting invalid charset should have failed!");
}
catch (IllegalCharsetNameException e)
{
// expected runtime exception.