@Test
public void testDrainQueue() {

  DataFileWriter<Event> writer = mock(DataFileWriter.class);
  eventQueue.add(eEventWrapper);
  eventQueue.add(eEventWrapper);
  eventQueue.add(eEventWrapper);
  eventQueue.add(eEventWrapper);
  eventHandlerThread = new EventHandler(fs, eventQueue);
  assertEquals(eventQueue.size(), 4);
  eventHandlerThread.drainQueue(eventQueue, writer); // should drain the queue
  assertEquals(eventQueue.size(), 0);
}