### Question:
ContentLengthField extends RtspHeader.Field { public static ContentLengthField parse(String fieldValue) throws ParseException { long length; try { length = Long.parseLong(fieldValue); } catch (Exception ex) { throw (ParseException) new ParseException("not a valid content-length field", 0).initCause(ex); } return new ContentLengthField(length); } ContentLengthField(long length); long getLength(); void setLength(long length); @Override String getValueText(); @Override ContentLengthField clone(); static ContentLengthField parse(String fieldValue);  }### Answer:
@Test public void testParse() throws ParseException { System.out.println("RTSP message Content-Length field parse test..."); String[] clfs = new String[] { "Content-Length:100", "Content-Length: 100", "content-length: 100", "Content-Length: test", }; int i = 0; ContentLengthField clf; for (; i < 3; i++) { clf = (ContentLengthField)RtspHeader.Field.parse(clfs[i]); assertEquals(clf.getLength(), 100l); } for (; i < clfs.length; i++) { try { RtspHeader.Field.parse(clfs[i]); fail("Content-Length field: \"" + clfs[i] + "\" parsed without an exception"); } catch (ParseException ex) { } } }