InterruptedException {
String spec = "collector(5000) { [ counter(\"foo\"), counter(\"bar\") ] }";
EventSink snk = FlumeBuilder.buildSink(new ReportTestingContext(
LogicalNodeContext.testingContext()), spec);
snk.open();
snk.append(new EventImpl("this is a test".getBytes()));
snk.close();
ReportEvent rpta = ReportManager.get().getReportable("foo").getMetrics();
assertEquals(1, (long) rpta.getLongMetric("foo"));
ReportEvent rptb = ReportManager.get().getReportable("bar").getMetrics();
assertEquals(1, (long) rptb.getLongMetric("bar"));