### Question:
Key implements Cloneable { @Override public String toString() { if ("prompt".equals(method)) return "k=" + method + "\r\n"; return "k=" + method + ":" + key + "\r\n"; } Key(String method, String key); String getKey(); void setKey(String key); String getMethod(); void setMethod(String method); @Override String toString(); @Override Key clone(); static Key parse(String line);  }### Answer:
@Test public void testToString() { System.out.println("SDP key toString test..."); Key k = new Key("tm", "tk"); assertEquals("k=tm:tk\r\n", k.toString()); k = new Key("prompt", null); assertEquals("k=prompt\r\n", k.toString()); }