// Test for method java.io.InvalidObjectException(java.lang.String)
try {
if (true) throw new InvalidObjectException("This object is not valid.");
fail("Exception not thrown.");
} catch (InvalidObjectException e) {
assertEquals("The exception message is not equal to the one " +
"passed to the constructor.",
"This object is not valid.", e.getMessage());
}