@Test(timeout = 30000L)
public void testPutAll() throws Exception {

  List<Event> events = Lists.newArrayList();
  events.add(EventBuilder.withBody(body, headers));
  agent.configure(properties);
  agent.start();
  agent.putAll(events);
  Event event;
  while ((event = eventCollector.poll()) == null) {
    Thread.sleep(500L);
  }
  Assert.assertNotNull(event);
  Assert.assertArrayEquals(body, event.getBody());
  Assert.assertEquals(headers, event.getHeaders());
}