### Question:
TimeDescription implements Cloneable { @Override public String toString() { StringBuilder bldr = new StringBuilder(); bldr.append("t=").append(startTime).append(" ").append(stopTime).append("\r\n"); if (periodic) { bldr.append("r=").append(repeatInterval).append(" ").append(activeDuration).append(" "); if (offsets.isEmpty()) bldr.append("0"); else { for (Long offset : offsets) bldr.append(offset).append(" "); bldr.delete(bldr.length() - 1, bldr.length()); } bldr.append("\r\n"); } return bldr.toString(); } TimeDescription(long startTime, long stopTime);  TimeDescription(); long getStartTime(); void setStartTime(long startTime); long getStopTime(); void setStopTime(long stopTime); long getActiveDuration(); void setActiveDuration(long activeDuration); boolean isPeriodic(); void setPeriodic(boolean periodic); long getRepeatInterval(); void setRepeatInterval(long repeatInterval); List<Long> getOffsets(); @Override String toString(); @Override TimeDescription clone(); static long getNtpTimestamp(); static long getNtpSeconds(); static int parse(SessionDescription out, String[] lines, int offset);  }### Answer:
@Test public void testToString() { System.out.println("SDP time description toString test..."); TimeDescription td = new TimeDescription(1, 2); assertEquals("t=1 2\r\n", td.toString()); td.setPeriodic(true); td.setRepeatInterval(3); td.setActiveDuration(4); assertEquals("t=1 2\r\nr=3 4 0\r\n", td.toString()); td.getOffsets().add(5l); assertEquals("t=1 2\r\nr=3 4 5\r\n", td.toString()); td.getOffsets().add(6l); assertEquals("t=1 2\r\nr=3 4 5 6\r\n", td.toString()); }