@Test
public void testReorderDecorator() throws IOException, InterruptedException {

  ReorderDecorator<EventSink> reorder =
      new ReorderDecorator<EventSink>(new ConsoleEventSink(), .5, .5, 0);
  reorder.open();
  for (int i = 0; i < 10; i++) {
    Event e = new EventImpl(new byte[0]);
    e.set("order", ByteBuffer.allocate(4).putInt(i).array());
    reorder.append(e);
  }
  System.out.println("closing");
  reorder.close();
}