@Test public void testConvertToTime02() { Exception ex = assertThrows(IllegalArgumentException.class, () -> DateConvertUtils.convertToTime(null)); assertThat(ex.getMessage(), is("date must not be null")); }
public static Time convertToTime(java.util.Date date) { assertArgs(date); Calendar cal = Calendar.getInstance(); cal.setTime(date); cal.set(Calendar.YEAR, DEFAULT_YEAR); cal.set(Calendar.MONTH, 0); cal.set(Calendar.DAY_OF_MONTH, 1); Time time = new Time(cal.getTimeInMillis()); return time; }
DateConvertUtils { public static Time convertToTime(java.util.Date date) { assertArgs(date); Calendar cal = Calendar.getInstance(); cal.setTime(date); cal.set(Calendar.YEAR, DEFAULT_YEAR); cal.set(Calendar.MONTH, 0); cal.set(Calendar.DAY_OF_MONTH, 1); Time time = new Time(cal.getTimeInMillis()); return time; } }
DateConvertUtils { public static Time convertToTime(java.util.Date date) { assertArgs(date); Calendar cal = Calendar.getInstance(); cal.setTime(date); cal.set(Calendar.YEAR, DEFAULT_YEAR); cal.set(Calendar.MONTH, 0); cal.set(Calendar.DAY_OF_MONTH, 1); Time time = new Time(cal.getTimeInMillis()); return time; } private  DateConvertUtils(); }
DateConvertUtils { public static Time convertToTime(java.util.Date date) { assertArgs(date); Calendar cal = Calendar.getInstance(); cal.setTime(date); cal.set(Calendar.YEAR, DEFAULT_YEAR); cal.set(Calendar.MONTH, 0); cal.set(Calendar.DAY_OF_MONTH, 1); Time time = new Time(cal.getTimeInMillis()); return time; } private  DateConvertUtils(); static Timestamp convertToTimestamp(java.util.Date date); static java.sql.Date convertToSqlDate(java.util.Date date); static Time convertToTime(java.util.Date date); }
DateConvertUtils { public static Time convertToTime(java.util.Date date) { assertArgs(date); Calendar cal = Calendar.getInstance(); cal.setTime(date); cal.set(Calendar.YEAR, DEFAULT_YEAR); cal.set(Calendar.MONTH, 0); cal.set(Calendar.DAY_OF_MONTH, 1); Time time = new Time(cal.getTimeInMillis()); return time; } private  DateConvertUtils(); static Timestamp convertToTimestamp(java.util.Date date); static java.sql.Date convertToSqlDate(java.util.Date date); static Time convertToTime(java.util.Date date);  }