### Question:
HL7Util { public static Date parseHL7Date(String s) throws HL7Exception { return parseHL7Timestamp(s); } private  HL7Util(); static Date parseHL7Timestamp(String s); static Date parseHL7Date(String s); static Date parseHL7Time(String s); static File getHl7ArchivesDirectory(); static final String LOCAL_TIMEZONE_OFFSET; }### Answer:
@Test @SuppressWarnings("deprecation") public void parseHL7Timestamp_shouldNotFlubDstWith20091225123000() throws HL7Exception { TimeZone originalTimeZone = TimeZone.getDefault(); TimeZone.setDefault(TimeZone.getTimeZone("EST")); Date d = HL7Util.parseHL7Date("20091225003000"); Assert.assertEquals(25, d.getDate()); TimeZone.setDefault(originalTimeZone); }
@Test public void parseHL7Timestamp_shouldHandle197804110615dash0200() throws HL7Exception { Date d = HL7Util.parseHL7Date("197804110615-0200"); Assert.assertEquals(new Long("261130500000"), (Long) d.getTime()); }