DaoUtil { public static Timestamp toTimestamp(BaseDateTime time) { return time == null ? null : new Timestamp(time.getMillis()); } private  DaoUtil(); static Timestamp toTimestamp(BaseDateTime time); static DateTime toDateTime(Timestamp time); static Integer getInt(ResultSet rs, String columnLabel); static Long getLong(ResultSet rs, String columnLabel);  }
@Test public void toTimestampWorksForNull() { assertThat(DaoUtil.toTimestamp(null), is(nullValue())); }