}
@Test
public void bandwidthMeter() throws Exception {
final String data = "Bandwidth metering!";
final BandwidthMeterHandler meter = new BandwidthMeterHandler();
PipelineFactory pf = new PipelineFactory(new ChunkedWriteHandler(), new SimpleResponseHandler(data));
pf.setFirst(meter);
startServer(pf);
assertEquals(data, get("/bandwidth"));
assertEquals(79, meter.getBytesSent());
assertEquals(94, meter.getBytesReceived());
meter.reset();
assertEquals(0, meter.getBytesSent());
assertEquals(0, meter.getBytesReceived());
}