String cfg = "{ mult(" + repeat + ") => counter(\"count\") }";
EventSink s = FlumeBuilder.buildSink(new ReportTestingContext(), cfg);
s.open();
for (int i = 0; i < msgs; i++) {
Event e = new EventImpl(("" + i).getBytes());
s.append(e);
}
CounterSink cnt = (CounterSink) ReportManager.get().getReportable("count");
Assert.assertEquals(msgs * repeat, cnt.getCount());