Let’s face it, compairing Date objects in Java is complex and as well as error-prone. This is the case in standard code, but this is also the case in testing code, where we regularly need to create Date objects that point at specific instant in time, to be our reference in comparison. The good ol' deprecated way In test code, I’ve no qualms about using deprecated methods. So, I used the old Date constructor to initialize dates: Date date = new Date(112, 5, 3); Pro: it’