### Question:
DownloadCommand extends AbstractCommand { public void setUrl(String url) { this.url = url; } DownloadCommand(); String getUrl(); void setUrl(String url); String getUsername(); void setUsername(String username); String getPassword(); void setPassword(String password); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }### Answer:
@Test public void testSer() { DownloadCommand constructed = new DownloadCommand(); constructed.setUrl("https: String json = ser.toJson(constructed); DownloadCommand deserialized = ser.fromJson(json, DownloadCommand.class); assertEquals(constructed, deserialized); assertTrue(json.replaceAll("\\s", "").startsWith("{\"command\":")); }