### Question:
AvroReportServer implements AvroFlumeReportServer { @Override public AvroFlumeReport getReportByName(CharSequence reportName) throws AvroRemoteException { ReportManager reportManager = ReportManager.get(); Map<String, Reportable> reports = reportManager.getReportables(); if (reports.containsKey(reportName.toString())) { return reportToAvro(reports.get(reportName.toString()).getReport()); } return null; } 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 testGetReportByName() 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()); } AvroFlumeReport rep = avroClient.getReportByName("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); }