* Test class IllegalCharsetNameException.
*/
public class IllegalCharsetNameExceptionTest extends TestCase {
public void testConstructor() {
IllegalCharsetNameException ex = new IllegalCharsetNameException(
"impossible");
assertTrue(ex instanceof IllegalArgumentException);
assertNull(ex.getCause());
assertEquals(ex.getCharsetName(), "impossible");
assertTrue(ex.getMessage().indexOf("impossible") != -1);
ex = new IllegalCharsetNameException("ascii");
assertNull(ex.getCause());
assertEquals(ex.getCharsetName(), "ascii");
assertTrue(ex.getMessage().indexOf("ascii") != -1);
ex = new IllegalCharsetNameException("");
assertNull(ex.getCause());
assertEquals(ex.getCharsetName(), "");
ex.getMessage();
ex = new IllegalCharsetNameException(null);
assertNull(ex.getCause());
assertNull(ex.getCharsetName());
assertTrue(ex.getMessage().indexOf("null") != -1);
}