I have a JUnit test that fails because the milliseconds are different. In this case I don\'t care about the milliseconds. How can I change the precision of the assert to i
Yet another workaround, I'd do it like this:
assertTrue("Dates aren't close enough to each other!", (date2.getTime() - date1.getTime()) < 1000);