### Question:
OracleUtilDateType extends UtilDateType { protected Date normalizeDate(Date time) { Calendar calendar = Calendar.getInstance(); calendar.setTime(time); calendar.set(Calendar.YEAR, 1970); calendar.set(Calendar.MONTH, 0); calendar.set(Calendar.DAY_OF_MONTH, 1); return calendar.getTime(); }  @Override Date materializeObject(CallableStatement cs, int index, int type); @Override Date materializeObject(ResultSet rs, int index, int type);  }### Answer:
@Test public void testNormalizeDate() throws Exception { Date date = new Date(); Date timeNormalized = new OracleUtilDateType().normalizeDate(date); assertNotNull(timeNormalized); Calendar raw = Calendar.getInstance(); raw.setTime(date); Calendar normalized = null; normalized = Calendar.getInstance(); normalized.setTime(timeNormalized); assertEquals(1970, normalized.get(Calendar.YEAR)); assertEquals(0, normalized.get(Calendar.MONTH)); assertEquals(1, normalized.get(Calendar.DAY_OF_MONTH)); assertEquals(raw.get(Calendar.HOUR_OF_DAY), normalized.get(Calendar.HOUR_OF_DAY)); assertEquals(raw.get(Calendar.MINUTE), normalized.get(Calendar.MINUTE)); assertEquals(raw.get(Calendar.SECOND), normalized.get(Calendar.SECOND)); }