DateUtils.ceiling does not behave as expected for dates exactly on the boundaries specified.
To be consistent with the name "ceiling", it follows that if a date is already at its "ceiling", it should not be pushed any higher. Yet the current implementation (and, it would appear, all implementations since its creation) of DateUtils.ceiling push a value exactly on its ceiling to the next value.
Observe what happens if the following tests are added to DateUtilsTest.testCeil():
The first assert passes, as Math.ceil behaves as it should (i.e. Mail.ceil(15.0) = 15.0).
However, the second assert fails with:
as the routine incorrectly (I believe) pushes the value to the next minute.
Either the method is incorrectly named (as previously suggested) or it should probably be corrected to be consistent with expected behaviour (using Math.ceil as a benchmark).
If changing the behaviour of DateUtils.ceiling is perceived to have too many flow-on effects (e.g. backwards compatibility issues) then perhaps it should be renamed to DateUtils.ceil to make it consistent with the Math class method name and to make the change in behaviour obvious (and perhaps also have a DateUtils.floor as a synonym for DateUtils.truncate).