/** * Nicely formats the information contained by the node that this object * encapsulates */ public String toString() { try { return "Content of the module named " + this.node.getName() + ":" + "Description: " + this.getDescription() + "\n" + "Format: " + this.getFormat() + "\n" + "Last modified: " + this.getLastModified() + "\n" + "Title: " + this.getTitle() + "\n" + "----\n"; } catch (Exception e) { log.error("Caught Exception", e); return ""; } }
/** * Nicely formats the information contained by the node that this object * encapsulates */ public String toString() { try { return "Content of the module named " + this.node.getName() + ":" + "Description: " + this.getDescription() + "\n" + "Format: " + this.getFormat() + "\n" + "Last modified: " + this.getLastModified() + "\n" + "Title: " + this.getTitle() + "\n" + "----\n"; } catch (Exception e) { log.error("Caught Exception", e); return ""; } }
Response res = api.get(url); assertNotNull(res.lastModified); assertEquals(pkg.getLastModified(), res.lastModified); ByteArrayOutputStream out = new ByteArrayOutputStream(); res.writeData(out);