### Question:
DateConverter { @TypeConverter public static Date toDate(Long timestamp) { return timestamp == null ? null : new Date(timestamp); }  @TypeConverter static Date toDate(Long timestamp); @TypeConverter static Long toTimestamp(Date date);  }### Answer:
@Test public void testToDate() { assertEquals(dateZero, DateConverter.toDate(timestampZero)); assertEquals(datePresentation, DateConverter.toDate(timestampPresentation)); assertEquals(dateZero, DateConverter.toDate(timestampNull)); }