// Expect expired for zero leniency on CRL expiring 1ms ago
final ThresholdExpiredCRLRevocationPolicy zeroThreshold = new ThresholdExpiredCRLRevocationPolicy();
zeroThreshold.setThreshold(0);
params.add(new Object[] {
zeroThreshold,
new MockX509CRL(issuer, oneHourAgo, new Date(now.getTime() - 1)),
new ExpiredCRLException("CN=CAS", new Date()),
});
// Test case #2
// Expect expired for 1h leniency on CRL expired 1 hour 1ms ago
final ThresholdExpiredCRLRevocationPolicy oneHourThreshold = new ThresholdExpiredCRLRevocationPolicy();
oneHourThreshold.setThreshold(3600);
params.add(new Object[] {
oneHourThreshold,
new MockX509CRL(issuer, twoHoursAgo, new Date(oneHourAgo.getTime() - 1)),
new ExpiredCRLException("CN=CAS", new Date()),
});
// Test case #3
// Expect valid for 1h leniency on CRL expired 30m ago
params.add(new Object[] {
oneHourThreshold,
new MockX509CRL(issuer, twoHoursAgo, halfHourAgo),
null,
});
return params;
}