I'm writing a unit test in Java that tests a method that calls a stored procedure to insert a row into a table. One of the columns in that table is defined as a DATE. The unit test calls the method that calls the stored procedure, then calls another already-tested method that reads back the row that should've been inserted into the table. The test then compares the values in the row read from the database with the values it attempted to insert into the table. The test defines the following value:
private static final long CREATED_TIME = 1392324106000L;
The value passed to the method that calls the stored procedure is:
When the row is read, I assert the following:
The assertion fails with the following message:
junit.framework.AssertionFailedError: expected:<1392324106000> but was:<1392267600000>
I have no idea what I'm doing wrong. Any help will be greatly appreciated.