@Test
public void testGetAllReports() throws TException {

  TTransport transport = new TSocket("localhost", PORT);
  TProtocol protocol = new TBinaryProtocol(transport);
  transport.open();
  ThriftFlumeReportServer.Client client = new ThriftFlumeReportServer.Client(
      protocol);
  Map<String, ThriftFlumeReport> ret = client.getAllReports();
  assertTrue(ret.size() == 1);
  ThriftFlumeReport rep = ret.get("reportable1");
  assertNotNull("Report 'reportable1' not found", rep);
  assertTrue("Expected exactly one double metric",
      rep.getDoubleMetricsSize() == 1);
  assertTrue("Expected double metric to be equal to 0.5", rep
      .getDoubleMetrics().get("doubleAttr") == 0.5);
}