### Question:
AvroReportServer implements AvroFlumeReportServer { @Override public Map<CharSequence, AvroFlumeReport> getAllReports() throws AvroRemoteException { Map<CharSequence, AvroFlumeReport> retMap = new HashMap<CharSequence, AvroFlumeReport>(); ReportManager reportManager = ReportManager.get(); Map<String, Reportable> reports = reportManager.getReportables(); for (Entry<String, Reportable> e : reports.entrySet()) { AvroFlumeReport report = reportToAvro(e.getValue().getReport()); retMap.put(e.getKey(), report); } return retMap; } AvroReportServer(FlumeConfiguration cfg);  AvroReportServer(int port); @Override Map<CharSequence, AvroFlumeReport> getAllReports(); @Override AvroFlumeReport getReportByName(CharSequence reportName); static AvroFlumeReport reportToAvro(ReportEvent report); void serve(); void stop();  }### Answer:
@Test public void testGetAllReports() throws IOException { transport = new HttpTransceiver(url); try { this.avroClient = (AvroFlumeReportServer) SpecificRequestor.getClient( AvroFlumeReportServer.class, transport); } catch (Exception e) { throw new IOException("Failed to open AvroReportServer at " + PORT + " : " + e.getMessage()); } Map<CharSequence, AvroFlumeReport> ret = avroClient.getAllReports(); assertTrue(ret.size() == 1); AvroFlumeReport rep = ret.get(new Utf8("reportable1")); assertNotNull("Report 'reportable1' not found", rep); assertTrue("Expected exactly one double metric", rep.doubleMetrics.size() == 1); assertTrue("Expected double metric to be equal to 0.5", rep.doubleMetrics .get(new Utf8("doubleAttr")) == 0.5); }