### Question:
QueryListener { public void onError(FirebaseFirestoreException error) { listener.onEvent(null, error); } QueryListener(
      Query query, EventManager.ListenOptions options, EventListener<ViewSnapshot> listener); Query getQuery(); boolean onViewSnapshot(ViewSnapshot newSnapshot); void onError(FirebaseFirestoreException error); boolean onOnlineStateChanged(OnlineState onlineState);  }### Answer:
@Test public void testRaisesErrorEvent() { Query query = Query.atPath(path("rooms/eros")); AtomicBoolean hadEvent = new AtomicBoolean(false); QueryListener listener = new QueryListener( query, new ListenOptions(), (value, error) -> { assertNull(value); assertNotNull(error); hadEvent.set(true); }); Status status = Status.ALREADY_EXISTS.withDescription("test error"); FirebaseFirestoreException error = Util.exceptionFromStatus(status); listener.onError(error); assertTrue(hadEvent.get()); }