OperationalReport extends Report { public String getRendering(String format) throws IOException { long start = System.currentTimeMillis(); String result; if(format.equals(FileFactory.CSV_FORMAT)){ result = getCSVRendering(); } else if(format.equals(FileFactory.HTML_FORMAT)){ result = getHTMLRendering(); } else { log.debug("Unknown format: " + format); result = ""; } log.debug("getRendering took " + (System.currentTimeMillis()-start) + "ms"); return result; } OperationalReport();  OperationalReport(String name, String info, List<Parameter> parameters, ReportGenerator reportGenerator); String getRendering(String format); String getHTMLRendering(); void getDownloadRendering(HttpServletRequest req, HttpServletResponse resp, String fileName, String format); void getDownloadRendering(HttpServletRequest req, HttpServletResponse resp, String fileName, String format, String destinationURL);  }
@Test public final void testGetRendering() { testOperationalReport(); try { String output = testInstance.getRendering(FileFactory.CSV_FORMAT); assertEquals(output, expectedOutput); } catch(Exception e) { fail(e.getMessage()); } try { String output = testInstance.getRendering(FileFactory.HTML_FORMAT); assertEquals(output, expectedHTMLOutput); } catch(Exception e) { fail(e.getMessage()); } }