### Question:
Attribute implements Cloneable { @Override public String toString() { if (value == null) return "a=" + name + "\r\n"; return "a=" + name + ":" + value + "\r\n"; } Attribute(String name, String value);  Attribute(String name); String getName(); void setName(String name); String getValue(); void setValue(String value); @Override String toString(); @Override Attribute clone(); static Attribute parse(String line);  }### Answer:
@Test public void testToString() { System.out.println("SDP attribute toString test..."); Attribute a = new Attribute("key"); assertEquals("a=key\r\n", a.toString()); a = new Attribute("key", "value"); assertEquals("a=key:value\r\n", a.toString()); }