/**
* @test
* @bug 4946388
* @summary Unit test for CertificateRevokedException
*/
public class Basic {
// test ctor for NPE
try {
throw new Exception("Did not throw expected NullPointerException");
} catch (NullPointerException npe) {}
// test getRevocationDate returns clone
throw new Exception("getRevocationDate does not return copy");
}
// test getRevocationDate returns the same date as specified in ctor
throw new Exception("getRevocationDate returns different date");
}
// test ctor copies date
throw new Exception("Constructor did not copy date parameter");
}
// test getReason returns same reason as specified in ctor
throw new Exception("getRevocationReason returns different reason");
}
// test getAuthorityName returns same name as specified in ctor
throw new Exception("getAuthorityName returns different name");
}
// test getInvalidityDate returns invalidity date
if (invalidity == null) {
throw new Exception("getInvalidityDate returned null");
}
throw new Exception("getInvalidityDate returned wrong date");
}
// test getInvalidityDate copies date
throw new Exception("getInvalidityDate did not return copy of date");
}
// test serialization
throw new Exception("deserialized exception returns different date");
}
throw new Exception("deserialized exception returns different reason");
}
throw new Exception("deserialized exception returns different name");
}
throw new Exception("deserialized exception returns different extensions");
}
}
}