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