use of io.spine.time.Timestamps2.toDate in project core-java by SpineEventEngine.
the class Timestamps2Should method convert_timestamp_to_date_to_nearest_second.
@Test
public void convert_timestamp_to_date_to_nearest_second() {
final Timestamp expectedTime = getCurrentTime();
final Date actualDate = toDate(expectedTime);
final long actualSeconds = actualDate.getTime() / MILLIS_PER_SECOND;
assertEquals(expectedTime.getSeconds(), actualSeconds);
}
Aggregations