EventCache { public void clear() { mDiskCache.uncache(); mQueue.clear(); } EventCache(EventDiskCache cache); void add(Event event); void drainTo(List<Event> drainedEvents); void clear(); boolean isEmpty(); boolean updateState(boolean online); void requeue(List<Event> events);  }
@Test public void testClear() { mEventCache.add(new Event("test")); mEventCache.clear(); verify(mEventDiskCache).uncache(); assertTrue(mEventCache.isEmpty()); }