@Test
public void testWriteEvent() throws IOException {

  DataFileWriter<Event> writer = mock(DataFileWriter.class);
  eventQueue.add(eEventWrapper);
  eventHandlerThread = new EventHandler(fs, eventQueue);
  assertEquals(eventQueue.size(), 1);
  eventHandlerThread.writeEvent(eventQueue, writer); // should remove the event from queue
  assertEquals(eventQueue.size(), 0);
  verify(writer).append(eEventWrapper);
}