### Question:
DateField extends RtspHeader.Field { public static DateField parse(String fieldValue) throws ParseException { return new DateField(dateFormat.parse(fieldValue)); } DateField(Date date); Date getDate(); void setDate(Date date); @Override String getValueText(); @Override DateField clone(); static DateField parse(String fieldValue);  }### Answer:
@Test public void testParse() throws ParseException { System.out.println("RTSP message Date field parse test..."); String[] dfs = new String[] { "Date:Sat, 25 Feb 2012 16:24:25 GMT", "Date: Sat, 25 Feb 2012 16:24:25 GMT", "Date: Sat, 25 Feb 2012 16:24:25 GMT", "Date: test", }; int i = 0; DateField df; for (; i < 3; i++) { df = (DateField)RtspHeader.Field.parse(dfs[i]); assertEquals(refDate, df.getDate()); } for (; i < dfs.length; i++) { try { RtspHeader.Field.parse(dfs[i]); fail("Date field: \"" + dfs[i] + "\" parsed without an exception"); } catch (ParseException ex) { } } }